Skip to main content

process_is_tcc_standalone

Function process_is_tcc_standalone 

Source
pub fn process_is_tcc_standalone() -> bool
Expand description

Returns true when this process is its own TCC identity on macOS — i.e. it was started (or re-parented) by launchd rather than by a TCC-granted host like a terminal or an editor.

Context (#356): TCC permissions attach to the responsible process. The lean-ctx daemon/proxy LaunchAgents and the scheduled auto-updater run directly under launchd (ppid 1), so any stat/read_dir they perform under ~/Documents pops the privacy prompt in lean-ctx’s own name — and because every release replaces the ad-hoc-signed binary (new cdhash), a previously granted permission is invalidated on each update, re-prompting forever. Such processes must never probe TCC-protected paths on their own initiative. Child processes of a terminal or editor (MCP server, CLI) inherit their host’s TCC grant and keep full functionality.