Skip to content

fix(macos): preserve terminal permissions across app updates - #25848

Closed
nwparker wants to merge 15 commits into
mainfrom
nwparker/macos-tcc-grants-full-disk-access-desktop-keep-g
Closed

nwparker wants to merge 15 commits into
mainfrom
nwparker/macos-tcc-grants-full-disk-access-desktop-keep-g

Conversation

@nwparker

@nwparker nwparker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1305 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1291
Prod 25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​979 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​949

ELI5

After a macOS update, terminals can lose access to protected files even while Orca's permission checkbox stays enabled. Keep the terminal service in its own signed app copy so replacing the visible app cannot break its privacy identity.

What Changed

Packaged macOS GUI launches now copy and verify the running signed bundle, then start its main executable independently through launchd in Node mode. The existing authenticated handshake and launch nonce establish ownership. App updates cannot move or delete this runtime. Settings report the app's Full Disk Access separately from every terminal host, including older generations and the in-process fallback; unavailable answers remain unknown. The probe reads one discarded byte and closes the handle even on read denial, rather than treating an allowed open as content access. Desktop/Documents/Downloads descriptions are added to the app and all Electron Helpers before signing, because the fork fallback still runs the daemon as Orca Helper.

Live sessions are preserved. Idle upgrades and deliberate restart use the existing recovery flows. Cleanup unregisters only an owned job and removes its copy only after an open-file check (lsof +D over the copy) establishes no use; uncertain inspection retains code. Copies live under runtime-*/app.noindex/, which Spotlight skips, so a copy is never listed as a second Orca app. Orca never registers a copy with LaunchServices (the macOS database that picks which app opens orca: links and Markdown/CSV files), and retirement removes any record macOS made on its own (lsregister -u) before deleting the copy. Local Network access does not depend on that record: macOS identifies the daemon by its code signature and main-executable UUID, and the launchd job names Orca through AssociatedBundleIdentifiers, the key a job not installed through SMAppService uses to say which app it belongs to. Copies in the earlier runtime-*/Orca.app layout still retire and classify the same way. A copy that was never submitted is also retired once its producer has exited and its job is missing, so a bootstrap timeout or a crash mid-copy no longer leaves it behind. The stable attempt must hand off by 45 s after the launch starts, so the fork fallback's own 10 s readiness wait and 5 s adapter install still fit the 60 s startup gate; copy, signature check and plist conversion share one abort signal that stops early enough for bootstrap and the job's readiness wait to fit as well. If the copied daemon's job exits before answering (for example refused at exec), the readiness wait notices within about 500 ms and hands off to the fork instead of waiting the full 10 s. Background retirement runs once per launch, one collection at a time, never per terminal. If the copy, signature check, plist or bootstrap fails in a way that proves no launchd job can still claim the terminal socket, Orca falls back to today's forked daemon, so terminals stay persistent for that run (only without the update protection). A bootstrap that timed out, or a job still running, stays an error so two daemons never race. The daemon_adopted, daemon_pty_cwd_denied and daemon_pty_cwd_readable events report a daemon started from the private copy as spawner_path_class=stable-copy, which identifies the fix per daemon.

Why

A signed native experiment reproduces lasting EPERM when a cold detached Helper first reads during the updater's app-path gap. Restoring the path leaves that Helper denied; a fresh Helper succeeds. Deleting an already warmed Helper image alone does not reproduce denial, so an unresolvable executable is insufficient evidence for killing sessions. An independent signed launchd app copy succeeds during the same gap. The independent signed app covers both path lifetime and responsibility while using the existing Orca grant. Restarting every daemon on update would discard live work, and copying only the executable would omit the signed resources and native dependencies. Related investigation: #20452. The signed investigation harness and its repeat commands are no longer in the diff; they are preserved at the investigation and repeat commands (pinned commit).

Rollback

To turn this off, make launchMacDaemonFromStableBundle in src/main/daemon/macos-daemon-launchd.ts return null at its first line; every launch then takes the fork path (a test pins that the launcher still forks and still runs the copy collection). Keep the retirement code (macos-daemon-bundle-retirement.ts and the retireAbandonedMacDaemonBundles call in the launcher's finally) until no copy-launched daemon can remain. Never revert the cleanup: the old code never deletes copies, and each keeps about 567 MB after an update removes the bundle it was cloned from.

Linked Issue

Fixes #13921

Visual Proof

Same injected app-granted / terminal-host-denied replies, rendered through Playwright CDP in hidden Electron. Before reports only “Granted”; after distinguishes the hosts and explains recovery. Native protected-file evidence is separate below.

Before:

Permission screen before

After:

Permission screen after

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Signed native macOS 26.3.1 arm64 experiment reproduces the original lasting denial and proves the independent identity survives. The rebuilt production launcher passed 22 real PTY checks for cwd, file contents, Apple Git and FDA across Desktop/Documents/Downloads, two different signed bundle replacements, old-bundle deletion, six fresh terminals and reconnect with the same daemon. The actual Helper packaging hook preserves main and all Helper designated requirements. The packaging-hook cold launch was 6.8 seconds and the reviewed run was 8.0 seconds and the final content-read probe run was 8.7 seconds; an earlier concurrent-test run was 25.9 seconds, neither a latency guarantee. Native abandoned-runtime collection removed an unused stopped copy after process exit, with no socket/token cleanup.

Native experiment results (macOS 26.3.1, matching designated requirements): Helper descendants before an update, allowed; a warmed Helper after its old executable is deleted, allowed; a cold Helper's first read while the app path is absent, EPERM, and still EPERM after the signed bundle is restored; a fresh Helper from the restored bundle, allowed; a launchd daemon from an independent signed copy, allowed during the gap and after restore.

After the simplification (re-run at 2893d219ee2), the real production launcher was run from an APFS clone of the installed app in Node mode: it copied and verified the bundle, bootstrapped the launchd job and completed the nonce-fenced handshake in 3.6 s; the daemon's image and recorded spawner were the copy (spawner_path_class=stable-copy); a PTY it hosted read one FDA-protected byte; a too-late deadline was refused with no job created; retirement removed a crashed copy while keeping the live copy and a live producer's copy; shutdown unregistered the job and removed the copy. lsof +D cost the same on the copy and its runtime directory (about 280 ms, same daemon listed). All jobs were booted out. Focused status/packaging/recovery tests, localization catalog and extraction checks, pnpm tc, pnpm run check:code-quality:changed, reliability-manifest validation and pnpm run build:electron-vite passed. Denied/unknown/granted UI states were checked; denied was inspected in both themes. Gate terminal.macos-tcc-update-identity is experimental. That gate is a test-evidence entry, not a runtime switch: the new launcher is on for every packaged macOS GUI launch.

Commit 0b5f6c48e09b passed all five full unit-test shards, relay integration, full lint/localization/type checks, mobile verification, Linux and Windows packaging, and native smoke on Linux, Windows and macOS. CI run. At 2893d219ee2 (after merging main once), pnpm lint, pnpm tc, the changed-code gate, reliability-manifest validation and the focused suites pass locally. In the daemon suite (2,440 tests), the only failures on this Mac are the 2 real-PTY #13767 repro tests, which fail identically on the merge-base main checkout.

LaunchServices (macOS 27.0, read-only NSWorkspace queries, owned clones and labels only): a runtime-*/Orca.app copy gets a record while it is being copied and a full com.stablyai.orca record when executed directly (the user's live copy was fully registered within 38 s); with a test identifier, a registered copy became the default handler for its URL scheme and document type once the installed bundle was unregistered, and lsregister -u removed it. The real launcher from a copy passed codesign --verify --deep --strict and the requirement match, a PTY it hosted read one FDA-protected byte and reached the local gateway, and a registered runtime-*/Orca.app copy classified as stable-copy and retired with its record removed. With the app.noindex layout (re-run at the head of this PR): Spotlight never listed the copy, while a sibling clone outside .noindex appeared within about 130 s; cloning left no LaunchServices record; the real launcher's daemon, with a PTY that read one FDA-protected byte and connected to the local gateway on port 53, left no record through 65 s, and retirement removed the copy. Running the copy's executable in Node mode from another process (a shell, or a child of a test daemon) gave it a full record in 5 of 7 attempts; Orca's daemon does not start its executable that way, and retirement removes such a record.

Physical x64/older macOS, real GUI ShipIt quit/relaunch, logout/login, notarized release Gatekeeper, non-APFS performance and individual folder grants without FDA need release-lane coverage. Local Network was checked from registered copies and from unregistered app.noindex copies whose job sets AssociatedBundleIdentifiers, all with the same executable as /Applications/Orca.app; a copy left behind by an Electron-changing update, whose executable differs from the installed app's, was not tested, to avoid a consent prompt. Accessibility and Automation are outside the measured FDA reproduction. Linux/Windows and Node/SSH hosts bypass the new launcher in guard tests; their existing paths and remote/mobile wire are unchanged.

Review

Ownership, startup deadlines, signed-copy integrity, checked responses and unknown-preserving cleanup reviewed. Existing legacy sessions are not automatically killed; already denied old terminals require deliberate recovery. An unverifiable job state or open-file check can retain an orphan copy rather than risk deleting live code.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No protocol bump or stream opcode. The additive daemon request falls back to unknown with older hosts. The launcher is independent of workspace type and only operates on the local packaged macOS GUI host.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Used the changed-code quality gate and Electron/Vite build locally; CI passed full lint/type checks, the full unit suite and Linux/Windows packaging. Notarized macOS release coverage remains in the release gaps above. The diff includes ownership, deadline and cleanup tests, so it is larger than a small patch.

@Jinwoo-H
Jinwoo-H marked this pull request as ready for review October 6, 2026 21:39
@Jinwoo-H
Jinwoo-H requested a review from brennanb2025 as a code owner October 6, 2026 21:39
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a66a6ef-630e-40a9-919b-1847ad725855
📥 Commits

Reviewing files that changed from the base of the PR and between 66cf4ae and 83665e9.

📒 Files selected for processing (1)
  • src/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The changes add a launchd-based stable-bundle startup path for packaged macOS terminal daemons. They verify bundle identity, check launch-job state, limit fork fallback by a deadline, and guard runtime-copy cleanup. They also add terminal-host Full Disk Access reporting to the daemon RPC and settings interface. The macOS package applies folder-usage descriptions to the app and matching helper apps. Tests, telemetry, documentation, and a reliability-gate entry cover these changes.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🟡 Moderate · up to 83665

The terminal-daemon launch fallback concern should be resolved or explicitly accepted before merging. The manual test harness may also hang.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning [ #13921 ] The private bundle copy protects a running daemon from app replacement. macos-daemon-bundle.ts verifies the copy against the currently installed app’s designated requirement, and `macos-d… Add an automated check of the app’s signing identity across the updater transition, or otherwise enforce and verify the required identity invariant across updates. The current copy-to-source signature check does not cover that requirement.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 49 functions across 45 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The launchd copy, retirement safeguards, signing checks, permission-status reporting, recovery UI, Helper privacy descriptions, telemetry, tests, and reference documentation support [#13921] by preser…
Title check ✅ Passed The title clearly identifies the macOS terminal-permission preservation fix across app updates.
Description check ✅ Passed The description is detailed and covers the required explanation, changes, rationale, linked issue, visual proof, testing, review, compatibility notes, and checklist. The optional AI Disclosure heading…
Full details: Linked Issues check

Explanation

[ #13921 ] The private bundle copy protects a running daemon from app replacement. macos-daemon-bundle.ts verifies the copy against the currently installed app’s designated requirement, and macos-daemon-launchd.ts launches the daemon from that copy. This does not verify that the designated requirement remains stable across app updates: the comparison is only between the copy and the current source bundle, and no updater-transition check is present in the reviewed changes. The added content-read probe, separate app and terminal-host status, and recovery guidance address the diagnostic objective.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 49 functions across 45 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 11df61a3-1ed6-47fb-85c0-f4084012520b
📥 Commits

Reviewing files that changed from the base of the PR and between d6b155d and ff00744.

📒 Files selected for processing (50)
  • config/electron-builder.config.cjs
  • config/reliability-gates.jsonc
  • config/scripts/macos-folder-usage-descriptions.cjs
  • config/scripts/macos-folder-usage-descriptions.test.mjs
  • docs/reference/macos-daemon-tcc-attribution.md
  • src/main/daemon/daemon-adoption-telemetry-event.test.ts
  • src/main/daemon/daemon-adoption-telemetry-event.ts
  • src/main/daemon/daemon-full-disk-access-status.test.ts
  • src/main/daemon/daemon-full-disk-access-status.ts
  • src/main/daemon/daemon-init-macos-stable-launch-fallback.test.ts
  • src/main/daemon/daemon-launched-child-spawn.ts
  • src/main/daemon/daemon-mac-code-identity.test.ts
  • src/main/daemon/daemon-mac-code-identity.ts
  • src/main/daemon/daemon-out-of-process-launcher.ts
  • src/main/daemon/daemon-permission-requests.ts
  • src/main/daemon/daemon-pty-adapter-full-disk-access.test.ts
  • src/main/daemon/daemon-pty-adapter.ts
  • src/main/daemon/daemon-request-router.ts
  • src/main/daemon/daemon-server.test.ts
  • src/main/daemon/macos-daemon-bundle-retirement.test.ts
  • src/main/daemon/macos-daemon-bundle-retirement.ts
  • src/main/daemon/macos-daemon-bundle.test.ts
  • src/main/daemon/macos-daemon-bundle.ts
  • src/main/daemon/macos-daemon-job-state.test.ts
  • src/main/daemon/macos-daemon-job-state.ts
  • src/main/daemon/macos-daemon-launchd.test.ts
  • src/main/daemon/macos-daemon-launchd.ts
  • src/main/daemon/macos-daemon-startup-budget.ts
  • src/main/daemon/types.ts
  • src/main/ipc/developer-permissions.test.ts
  • src/main/ipc/developer-permissions.ts
  • src/main/macos-full-disk-access-status.test.ts
  • src/main/macos-full-disk-access-status.ts
  • src/renderer/src/components/settings/DeveloperPermissionsPane.test.tsx
  • src/renderer/src/components/settings/DeveloperPermissionsPane.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/shared/daemon-adoption-telemetry.test.ts
  • src/shared/daemon-adoption-telemetry.ts
  • src/shared/developer-permissions-types.ts
  • src/shared/telemetry-daemon-event-schemas.ts
  • tests/tools/macos-tcc-update/.gitignore
  • tests/tools/macos-tcc-update/daemon.cjs
  • tests/tools/macos-tcc-update/parent.cjs
  • tests/tools/macos-tcc-update/product-launch.ts
  • tests/tools/macos-tcc-update/product.py
  • tests/tools/macos-tcc-update/run.py
  • tests/tools/macos-tcc-update/ui/fixture.css
  • tests/tools/macos-tcc-update/ui/fixture.tsx
  • tests/tools/macos-tcc-update/ui/index.html
  • tests/tools/macos-tcc-update/ui/prepare.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Comment thread tests/tools/macos-tcc-update/product.py Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f27f03b6-9213-4b30-b616-ca47a8af3cbf
📥 Commits

Reviewing files that changed from the base of the PR and between 291392f and 2893d21.

📒 Files selected for processing (4)
  • src/main/daemon/daemon-launched-child-spawn.ts
  • src/main/daemon/daemon-out-of-process-launcher.ts
  • src/main/daemon/macos-daemon-launchd.test.ts
  • src/main/daemon/macos-daemon-launchd.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Comment thread src/main/daemon/macos-daemon-launchd.ts Resolved
nwparker and others added 15 commits October 7, 2026 15:36
…ndpoint

A copy, signature, plist or deadline failure before bootstrap, a bootstrap
launchd refused with the job absent, a job whose daemon exited before
answering, and a foreign endpoint all threw out of the launcher. The app then
lost its persistent daemon and fell back to local PTYs, where main forks one.
These now fall through to the existing fork path, which also adopts a foreign
occupant normally instead of as a degraded endpoint. A timed-out bootstrap or
a job still running/unreadable stays fatal, so no second daemon races it.
daemon_adopted, daemon_pty_cwd_denied and daemon_pty_cwd_readable gain a
closed-enum launch_method (stable-copy / app-fork / unknown), read from the
spawner path the daemon recorded, so the update fix is measurable per daemon
even when an old forked daemon is adopted across updates. The reliability
gate is a test manifest with no runtime switch, so there is no gate state to
report; spawner_path_class reports the private copy as 'other' alongside
other non-/Applications installs.
The separate launch_method property duplicated what the recorded spawner
path already says. spawner_path_class gains `stable-copy`, classified from
the same path under the private runtime root, and launch_method, its enum
and classifier are removed from all three .strict() daemon origin events.
A deleted copy still reports `missing`.
The permissions handler already asks for the terminal-host status only on
macOS, so the status function's own platform check and the pane's
'unsupported' branch could never fire. The off-macOS guarantee is now
tested at the handler.
The stable launch could run until 55 s after the launch started, so a late
"unavailable" verdict left the fork fallback's own 10 s readiness wait to
finish after the 60 s gate had already moved the app to local PTYs.

The launcher now gives the stable attempt one handoff deadline: the gate
minus the fork's readiness timeout and the 5 s lease/adapter allowance
(45 s). Copy, signature check and plist conversion share one abort signal
that ends early enough for bootstrap and the job's own readiness wait to
meet that deadline; every command otherwise keeps a fixed timeout. An
unavailable verdict past the deadline is reported instead of forking a
daemon that cannot arrive in time. The per-step budget module is gone (its
deletion landed in the previous commit by a staging slip).

The launch body is now two blocks: preparation (plist, plutil, deadline
check) fails as unavailable after removing the copy and job file, and
bootstrap runs in its own try/finally that always deletes the job file.

Retirement is simpler and claims more orphans: one in-flight collection per
process instead of a per-root map and rotating 20-record scan, and the job
record (written before copying) no longer carries a bundle name because
lsof +D scans the whole runtime directory (measured equal cost, same
result on a live copy). A never-submitted copy is retired once its producer
has exited and its job is missing, so a bootstrap timeout or a crash
mid-copy no longer leaves a copy forever; the open-file check still guards
deletion. Collection now starts from the launcher after the attempt.
The signed investigation harness left the tree in the previous telemetry
commit by a staging slip; its results and pinned link stay in the PR. This
trims the reference doc to why the copy and launchd exist, the fallback
states and the cleanup rule, trims the reliability gate to what its
validator needs, and points AGENTS.md at the reference doc next to the
Windows relocation entry.
A copied daemon refused at exec (for example by Gatekeeper) never answers,
so every fresh start paid the full 10 s readiness wait before the fork
fallback. The readiness loop now reads the job state every 500 ms and
abandons as soon as the job is stopped or missing; a running or
unreadable job is still waited out and never forked beside.

Also drops the dead forkEntryPath the stable launch never read (its
options type now omits it) and un-exports the handoff constant.
…d ones

Each runtime copy is a full Orca.app, so Spotlight indexed it as an app
and LaunchServices kept a record for it that outlived the copy. A
registered copy claims orca: links and Markdown/CSV files, and becomes
their default handler whenever /Applications/Orca.app is not registered.

New copies go under runtime-*/app.noindex/, which Spotlight skips and which
stops the record LaunchServices made while the bundle was being copied.
Retirement now runs lsregister -u on every bundle in the copy (both the
app.noindex layout and the earlier runtime-*/Orca.app layout) once lsof
shows it unused, then deletes it. A running copy stays registered,
because Local Network access may be resolved through that record.

Collection and stable-copy telemetry match the runtime-* directory, so
copies made before this change are still adopted, classified and retired.
The reference doc now explains why copies sit in a .noindex folder, why
only retired copies are unregistered, and how to turn the copy launch off:
make launchMacDaemonFromStableBundle return null, and keep the retirement
code until no copy-launched daemon can remain, because the old code never
deletes copies.

A test pins that rollback: with the stable launcher returning null, the
launcher forks and still runs the copy collection.
…e them

The `.noindex` folder kept copies out of Spotlight and LaunchServices, but
Local Network access is resolved from the signing identifier through
LaunchServices to the executable's Mach-O UUID. After an update that changes
Electron only the copy carries the running daemon's UUID, so an unregistered
copy risks the same Local Network loss main has today. Copies go back to
`runtime-*/Orca.app`; retirement still unregisters each copy before deleting
it, so deleted copies leave no LaunchServices entry. The remaining trade-off:
while `/Applications/Orca.app` is missing, a running registered copy can be
picked for `orca:` links and documents.
Spotlight listed each runtime copy as a second Orca app. New copies go
back under runtime-*/app.noindex/Orca.app, which Spotlight skips.
Retirement and stable-copy telemetry match the runtime-* directory, so
copies in the earlier runtime-*/Orca.app layout still retire and classify
the same way.

Local Network access identifies the daemon by its code signature and
main-executable UUID, not by a LaunchServices record, so an unregistered
copy keeps it. The launchd job now sets AssociatedBundleIdentifiers to
com.stablyai.orca, which is how a job not installed through SMAppService
names the app it belongs to. Copies are never registered explicitly;
retirement still runs lsregister -u before deleting each one.
@Jinwoo-H
Jinwoo-H force-pushed the nwparker/macos-tcc-grants-full-disk-access-desktop-keep-g branch from 01a12fd to aa607ef Compare October 7, 2026 19:40
@Jinwoo-H

Copy link
Copy Markdown
Contributor

Closing in favour of #27021, which carries this fix forward. Instead of a copy of the whole app, it runs the daemon from a small signed helper (about 124 MB instead of 628 MB) that keeps Orca's identity, and it reuses one copy per build. The settings status and telemetry from this PR continue in #27354.

@Jinwoo-H Jinwoo-H closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS TCC grants (Full Disk Access / Desktop) keep getting invalidated after Orca updates — child processes hit EPERM mid-session

2 participants