Repository navigation
Description
Operating system
macOS
Orca version
1.4.230 (remote-updated from 1.4.229)
Details
Short summary
On macOS, after a remote update of a supervised headless orca serve (installMode: supervised-headless-serve), the CLI supervisor process is not restarted. It keeps running from the old app bundle, and Squirrel has already deleted that bundle. In our case, the supervisor was the TCC responsible process for the Electron serve child, the computer-use helper, and the terminal processes we checked. tccd could not resolve it, and orca computer and screencapture failed with permission errors. Computer use was still broken the next day, and restarting the supervisor fixed it.
Setup
- Mac mini (Apple M1), macOS 27.0.1
orca serveruns as a user LaunchAgent withKeepAlive.ProgramArgumentsis/bin/zsh -lc "exec /usr/local/bin/orca serve --pairing-address <tailnet ip> --json".orca computer permissions --jsonreports accessibility and screenshots asgranted.
Observed sequence
orca servewas running under launchd on 1.4.229.- We updated it remotely with the runtime RPCs
updater.check,updater.downloadandupdater.install. Squirrel replaced/Applications/Orca.app. The supervisor respawned the Electron serve child on 1.4.230 and kept its own PID. - The next day, from an Orca terminal session on that server,
orca computer get-app-state --app com.apple.finderandscreencapture -x out.pngfailed.
What happened
orca computer get-app-statefailed withpermission_denied: "Accessibility permission is required for Orca Computer Use. ..." This happened for Finder and for another app we tried.screencapture -xfailed with "could not create image from display".- In a shell,
AXIsProcessTrusted()andCGPreflightScreenCaptureAccess()both returned false. - At the same time,
orca computer permissions --jsonstill reported both permissions asgranted.
The supervisor's executable was in the deleted pre-update bundle:
$ lsof -p <supervisor pid> -a -d txt
Orca <pid> ... /private/var/folders/<..>/T/com.stablyai.orca.ShipIt.<random>/Orca.app/Contents/MacOS/Orca
During the failure, tccd logged these lines again and again:
tccd: [com.apple.TCC:access] proc_pidpath_audittoken() failed from PID[<supervisor pid>]: (#2) No such file or directory
tccd: [com.apple.TCC:access] Failed to create attribution chain from message.
responsibility_get_pid_responsible_for_pid() returned the supervisor PID for every process we checked under it:
- the Electron serve child
- the
computer-sidecar.jshelper - the
orca-computer-use-macos --agentprocess - the two terminal daemons started under this supervisor (protocol v48 and v49)
- three agent CLI processes and one shell running in those daemons' terminals
Workaround
We restarted the LaunchAgent with launchctl kickstart -k gui/$(id -u)/<label>. The terminal daemons run in their own process groups. After the restart, all 11 Claude sessions that were already running were still running. The first Accessibility request after the restart, 13 seconds later, was attributed to com.stablyai.orca (the new supervisor), and tccd returned authValue=2. orca computer get-app-state worked again, with the tree and a screenshot. screencapture and AXIsProcessTrusted() also worked from a session that had started before the restart.
Why the existing safeguards miss it
src/cli/runtime/serve-update-supervisor.ts: onawait-install,superviseForegroundServewaits for the new bundle version and callsspawnChildagain. The supervisor process itself never re-execs from the new bundle.src/main/computer/macos-native-provider-transport.ts:spawnProviderstarts the helper withspawn(..., { detached: true }). The comment says that the signed helper executable owns the grant. Here, the helper inherited the supervisor as its responsible process.src/main/daemon/daemon-tcc-attribution.ts(STA-3491) reports a daemon asseveredonly whenspawnerExecPathno longer exists. The daemon pid files record/Applications/Orca.app/Contents/MacOS/Orca. After an in-place update, that path exists again because it is the new bundle. So when the daemon identity check passes, this function returnsintact. The process that tccd could not resolve was the supervisor above the spawner.
Possible fix
After a verified install, the supervisor could restart itself from the new bundle. It could exit so that launchd starts it again, or it could re-exec the new executable. The supervisor already reads the installed bundle version in waitForMacBundleVersion. When that version differs from the supervisor's own version, the supervisor is running from a replaced bundle.
Related
- macOS terminal cwd becomes unreadable when app and daemon versions are mismatched #17696: a terminal daemon from a previous app generation loses file access for its shells. That case involves a stale daemon. Here the stale process is the serve supervisor.
- orca computer: Accessibility permission_denied persists despite granted TCC access (preflight-unknown race on fresh helper process) #9458:
permissionssays granted whileget-app-stateis denied. That issue was traced to a preflight race on a fresh helper process.
Activity