Skip to content

orca computer: Accessibility permission_denied persists despite granted TCC access (preflight-unknown race on fresh helper process) #9458

Closed

Description

@haniakrim

Summary

orca computer get-app-state (and other orca computer actions) consistently return permission_denied for Accessibility even when the "Orca Computer Use" helper is granted Accessibility access in System Settings, verified as granted, and confirmed via TCC's own IPC responses in some code paths but not others within the same process.

Environment

  • Orca version: 1.4.145 (also checked 1.4.146 changelog — no related fix)
  • macOS, Apple Silicon
  • orca computer capabilities --json reports the macOS provider is active and functional

Reproduction

  1. Fresh install, quarantine cleared (xattr -dr com.apple.quarantine), no translocation
  2. tccutil reset Accessibility com.stablyai.orca.computer-use and com.stablyai.orca, grant fresh in System Settings → Privacy & Security → Accessibility, confirm checkbox checked
  3. orca computer permissions --json reports "accessibility": "granted"
  4. orca computer get-app-state --app com.google.Chrome --restore-window --json still returns:
    {"error": {"code": "permission_denied", "message": "Accessibility permission is required for Orca Computer Use..."}}
  5. Reproduces identically against other target apps (Finder), so it is not Chrome/Automation-specific — pure Accessibility gate.

Root cause (traced via log show --predicate 'process CONTAINS "orca-computer-use"')

Each orca computer CLI invocation appears to spawn a fresh, short-lived orca-computer-use-macos helper process (distinct temp socket dir under /var/folders/.../orca-computer-use-XXXXXX/ each time).

Live TCC IPC trace for a single fresh process (pid 73661) shows the SAME identity flapping across three different answers within its own lifetime:

SEND kTCCServiceAccessibility (self, pid 73661) -> RECV auth_value=0, result=false        (denied)
SEND kTCCServiceAccessibility (self, pid 73661) -> RECV auth_value=0, result=false        (denied, again)
SEND kTCCServiceAccessibility (target pid 841)  -> RECV auth_value=2, result=true         (granted, different target)
... later, same process ...
SEND kTCCServiceAccessibility (self, pid 73661) -> RECV auth_value=2, result=true         (now granted)

Separately, calls tagged auth_reason=5 consistently come back as:

{"prompt_type": 1, "auth_value": 1, "preflight_unknown": true, "do_not_cache": true}

i.e. macOS's own "unknown, do not cache" preflight response — which is the expected answer from tccd for a freshly spawned process that has not yet made a real (non-preflight) access attempt, regardless of the bundle-level grant already recorded in TCC.db.

This strongly suggests the permission gate in orca computer is calling the cheap preflight check (AXIsProcessTrustedWithOptions with prompt disabled, or equivalent) and immediately failing with permission_denied on auth_value != 2, instead of either:

  • attempting the real action directly (which would trigger the proper enforcement check and succeed given the actual system-wide grant), or
  • retrying once against the non-preflight path before giving up.

Because a fresh helper process is spawned per invocation, this preflight-only check will legitimately return "unknown" on every single call, making the Accessibility gate permanently unusable for CLI-driven orca computer actions even when correctly granted.

Suggested fix

Either:

  1. Reuse a single long-lived helper process (so it "warms up" past the first preflight-unknown state), or
  2. Have the permission gate perform the real accessibility call (or a proper AXIsProcessTrusted() check without do_not_cache) instead of relying on a fresh-process preflight response, or
  3. Retry the check once after a short delay / after triggering a real (non-preflight) TCC request before surfacing permission_denied to the CLI caller.

Happy to provide the full log show trace or test a patched build.

Activity

  1. haniakrim commented on Jul 19, 2026

    @haniakrim
    Author

    Update: tried 3 source-level fixes, none resolved it — likely not a simple code bug

    Cloned the repo and patched accessibilityTrusted() in native/computer-use-macos/Sources/OrcaComputerUseMacOS/main.swift three ways, rebuilding and re-deploying (ad-hoc signed locally) between each:

    1. Plain retry loop around AXIsProcessTrusted() (10x, 50ms apart) — no change, still denied every call.
    2. Added AXIsProcessTrustedWithOptions([kAXTrustedCheckOptionPrompt: true]) per Apple's documented pattern for forcing a real settlement instead of a passive/preflight check — no change.
    3. Extended retry budget to ~6 seconds (40x, 150ms, alternating both APIs) — confirmed via wall-clock timing that the full budget actually ran (7s per call), still denied 100% of the time (0/6 across two runs).

    Also tested and ruled out:

    • Hardened runtime vs. ad-hoc-only signing — re-signed without --options runtime, no change.
    • Responsible-process ancestor — invoked via both a plain shell and osascript -e 'do shell script ...' (different ancestor chains) — same failure both ways.
    • Stale/duplicate binary — confirmed via find / only one active copy exists at the expected path, and strings confirms the deployed binary contains the patched code.
    • runStdio() dead code path — confirmed it just exit(13)s; all CLI calls go through runAgent()/NSApplication, same as the passing self-check path.

    Most importantly: this flapping reproduces on the original, unmodified, Developer-ID-signed v1.4.145 build, before any of my changes — so it isn't something introduced by ad-hoc re-signing or my patches. orca computer permissions --json (which also calls accessibilityTrusted(), per printPermissionStatus()/writePermissionStatus()) consistently reports granted, while the identical check inside buildSnapshot() for a freshly-spawned agent instance consistently reports denied, with no code-level combination of retries/APIs changing that outcome.

    My best remaining guess: this may be inherent to how a new agent process gets spawned per CLI invocation rather than a single persistent daemon reused across calls — i.e. the fix might need to be architectural (keep one warm, already-trusted agent process alive and route all orca computer calls through it, instead of spinning up a fresh one per call) rather than anything fixable inside accessibilityTrusted() itself. I didn't attempt that change — it's a bigger surface area than I want to touch blind on someone's production install.

    Happy to test a candidate fix if useful.

  2. AmethystLiang commented on Jul 19, 2026

    @AmethystLiang
    Contributor

    Duplicate consolidation

    Closing #9159 as a duplicate of this issue.

    Both report the same computer-use failure mode: orca computer permissions reports Accessibility granted, while real actions like get-app-state return permission_denied.

    This issue has the deeper TCC preflight / fresh-helper-process root-cause analysis, so it is the canonical tracker.

    Related (not duplicates):

  3. Tamaz-sujashvili commented on Jul 24, 2026

    @Tamaz-sujashvili

    Related Screen Recording variant of this same fresh-helper preflight race: #10372.

    CGPreflightScreenCaptureAccess() stays false / permissions.screenshots=not-granted while System Settings already shows Orca Computer Use Screen Recording toggled ON, and the drag-assistant keeps asking to add an app that is already listed.

    Proposed fix (settle + one real capture probe): stacked on #10122 in a follow-up PR from that branch.

  4. added
    bug
    on Jul 27, 2026
  5. buchi1122 commented on Oct 24, 2026

    @buchi1122

    I have a recorded observation from October 23, 2026 on macOS:

    • Listing Chrome windows succeeded.
    • Reading a selected Chrome window with get-app-state and --no-screenshot failed with exit code 1 and permission_denied. The message included: “Accessibility permission is required for Orca Computer Use.”

    Orca 1.4.230 was confirmed later that day. The retained evidence does not independently establish the build used by the failed request. I have not verified whether the failure is still reproducible.

    An earlier System Settings check showed Orca Computer Use enabled under Accessibility. That does not establish the effective Accessibility trust of the process handling the failed request. The cause and any update-related trigger remain unconfirmed.

    I am asking here because this issue records the same error wording. I also found #31022, closed through PR #31200, concerning a specific macOS serve-supervisor update problem. I have not established that my case matches that setup. #20078 reports a different “visible windows but no accessibility window” message, so I am not assuming a shared cause.

    1. Is there a supported read-only diagnostic, without resetting permissions, restarting processes, or changing configuration, that checks the effective Accessibility trust of the process handling this request?
    2. Is there a released fix relevant to this error, or should this observation be filed separately? If PR fix(serve): restart the macOS serve supervisor from the updated app #31200 may apply, which release and setup prerequisites should I check?

    No logs, screenshots, local paths, or runtime identifiers are attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions