Repository navigation
feat(macos): enable Computer Control by default and diagnose stale Accessibility grants - #115280
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 12:41 PM ET / 16:41 UTC. ClawSweeper reviewWhat this changesThis PR makes an unset macOS Computer Control preference default to enabled, preserves an explicit disabled preference, and adds separate Accessibility, Event Posting, and Screen Recording diagnostics, tests, and user documentation. Merge readinessKeep this PR open for explicit maintainer approval: it intentionally changes the durable macOS consent posture rather than merely repairing diagnostics. The implementation consistently preserves an explicit opt-out and retains macOS permission enforcement, and the supplied real-device proof and exact-head CI support a positive technical review. Likely related people: steipete is the strongest routing candidate (high confidence) from the prior merged durable-consent work and this macOS control path. Priority: P2 Review scores
Verification
How this fits togetherThe macOS node advertises Computer Control capabilities to a paired Gateway, which can then request pointer, keyboard, and screenshot actions. Local preference state and macOS TCC permission buckets determine whether the node advertises the capability and whether each requested action can run. flowchart LR
A[Stored macOS preference] --> B[Computer Control default resolver]
B --> C[Mac node capability advertisement]
D[Paired Gateway request] --> E[Computer action handler]
F[macOS Accessibility and TCC buckets] --> E
E --> G[Input action or closed error]
F --> H[Settings permission diagnostic]
H --> I[Operator recovery guidance]
Decision needed
Why: This is an intentional compatibility and security-boundary change affecting the authorization posture of existing paired Macs; code review cannot substitute for maintainer acceptance of that product policy. Before merge
Agent review detailsSecurityNone. PR surfaceTests 0, Docs +16, Other +285. Total +301 across 13 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after the responsible maintainer explicitly confirms that default-on Computer Control, with pairing and macOS TCC as the remaining gates, is the intended upgrade posture; retain the shared unset-versus-explicit-false resolver and closed permission errors. Do we have a high-confidence way to reproduce the issue? Not applicable as an issue reproduction: this PR implements a stated product-direction change. The contributor provides a concrete real-device after-fix exercise for stale Accessibility permission behavior and focused regression coverage for preference semantics. Is this the best way to solve the issue? Yes for the diagnostic and preference semantics: centralizing the resolver prevents callers from treating unset and explicit false alike, and the permission snapshot preserves fail-closed action handling. The remaining question is product acceptance of the deliberate default-on upgrade behavior, not a narrower implementation defect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f84ee793da02. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…-20260728 * origin/main: fix(tui): order delayed prompts before completed replies (#115219) feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (#115280) fix(qa): restore full-stack scenarios and truthful suite exits (#115290) feat(memory): backfill past sessions from Control UI (#115266) docs: link macOS onboarding pages to app download (#111361) feat(skills): shared authoring standards make learned skills routable (#115103) fix(matrix): suppress previews for modifying hooks fix: prevent node gateway hangs and runaway local inference (#115248) refactor(ui): adopt @lit/task across remaining page surfaces (#115274)
* origin/main: (62 commits) feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (openclaw#115280) fix(qa): restore full-stack scenarios and truthful suite exits (openclaw#115290) feat(memory): backfill past sessions from Control UI (openclaw#115266) docs: link macOS onboarding pages to app download (openclaw#111361) feat(skills): shared authoring standards make learned skills routable (openclaw#115103) fix(matrix): suppress previews for modifying hooks fix: prevent node gateway hangs and runaway local inference (openclaw#115248) refactor(ui): adopt @lit/task across remaining page surfaces (openclaw#115274) fix(slack): cap chat.update edit text at the 4000-char limit, not the 8000 send limit (openclaw#115027) [AI-assisted] docs: recommend Node 26 in quickstart, landing, and platform install docs (openclaw#115064) refactor(workboard): tidy Control UI card execution helpers (openclaw#115195) perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281) fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232) fix: restore Fish completion after global CLI options (openclaw#115222) refactor(agents): collapse the client-tool catalog branch (openclaw#115212) fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957) fix(agents): prevent repeated Code Mode output across waits (openclaw#115213) refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229) fix(cli): reject malformed infer model refs (openclaw#115225) ...
…cessibility grants (openclaw#115280) * feat(macos): enable and diagnose computer control * docs(macos): explain computer control permissions * chore: refresh macOS i18n and docs indexes * test: update macOS computer control i18n fixture
What Problem This Solves
Computer use was unusable out of the box on macOS for two independent reasons, both confirmed by live testing on a real M4 Max Mac running macOS 27.0.
First,
openclaw.computerControlEnableddefaulted tofalse, so a paired Mac node never advertisedcomputer.act. Second, a stale macOS Accessibility grant failed invisibly and produced a misleading error. The observed TCC row stored the app's code requirement as a cdhash pin (cdhash H"a21f67e3…") while the installed binary hashed tofacb6e13…; rebuilding silently invalidated the grant.AXIsProcessTrusted()then returned false even though System Settings still showed OpenClaw enabled, and the old error only told the operator to grant Accessibility permission. Screen Recording continued working because macOS stores it in a separate TCC bucket, so screenshots succeeded while clicks and keystrokes failed.Why This Change Was Made
This is the explicit owner decision from Peter Steinberger that computer use should be enabled by default. That confirmation includes upgrade semantics: existing installations with no stored
openclaw.computerControlEnabledvalue should become enabled, while an explicitly storedfalseremains off. Default-on does not grant or bypass any macOS permission: TCC remains the hard backstop, and the app can only drive input after the operator has granted the relevant system permission.Making the capability default-on also makes stale grants more visible, so the diagnostic ships with the default change. The stale-grant heuristic is deliberate, owner-approved, and backed by the observed production signature: Accessibility denied while Screen Recording is granted. It does not weaken the failure mode; the operation still fails closed with
ACCESSIBILITY_REQUIRED.This changes one persisted preference default from disabled to enabled while preserving an explicit off choice. The implementation uses
object(forKey:) as? Bool ?? true, neverbool(forKey:), so an operator's existingfalseremains authoritative. No new config key, environment variable, migration, permission grant, or fallback surface is introduced.User Impact
Allow Computer Control now defaults to enabled. A paired Mac can advertise and accept computer actions without a separate OpenClaw opt-in, but macOS Accessibility and Screen Recording permissions continue to gate what succeeds.
The app now probes Accessibility, Event Posting, and Screen Recording as separate permission buckets and shows their status in Settings → General → Capabilities before an action fails. The heuristic remains explicitly conditional in product copy: the state is “Accessibility grant may be stale,” not a claim that every matching denial is a confirmed stale code-signing record. It explains the observed recovery path: remove OpenClaw with the − button under System Settings → Privacy & Security → Accessibility, re-add
/Applications/OpenClaw.app, and restart OpenClaw because Accessibility trust is cached per process.Error handling remains closed: ordinary and stale Accessibility denial both use
ACCESSIBILITY_REQUIRED; post-event denial uses the new sibling codePOST_EVENT_REQUIRED. The docs now state the security-relevant consequence explicitly: with arming retired in #114892, a paired gateway can drive input without per-action confirmation when Computer Control is enabled and macOS has granted permission.Evidence
swift test --package-path apps/macos --filter ComputerControlSettingsTests: 1/1 passed.swift test --package-path apps/macos --filter ComputerActionServiceTests: 22/22 passed.swift build --package-path apps/macos --product OpenClaw --configuration release: passed with the repository-supported Xcode 26.6. Xcode 27 fails to load@rpath/Sparkle.framework.git diff --check: clean.swift testrun had two pre-existing environment-dependent failures outside this change: persisted device identity inGatewayChannelRequestTestsand an onboarding activation-owner assertion. Neither suite references computer control, so this PR does not claim a fully green local full suite.origin/mainata6622ddb6fdwas conflict-free;git range-diffconfirmed both rebased commits are patch-identical to the reviewed originals.node scripts/run-vitest.mjs test/scripts/native-app-i18n.test.tspassed 13/13; native i18n verification and docs map check both passed.dbfc81e8cfca1e626d51f644c97f114044bd8c76throughscripts/watch-pr-ci.mjs.