Skip to content

feat(macos): enable Computer Control by default and diagnose stale Accessibility grants - #115280

Merged
steipete merged 4 commits into
mainfrom
steipete/mac-computer-use-default-0728
Jul 28, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/mac-computer-use-default-0728

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

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.computerControlEnabled defaulted to false, so a paired Mac node never advertised computer.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 to facb6e13…; 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.computerControlEnabled value should become enabled, while an explicitly stored false remains 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, never bool(forKey:), so an operator's existing false remains 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 code POST_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

  • Live-tested on a real M4 Max Mac running macOS 27.0, including the stale cdhash-pinned Accessibility grant signature, successful Screen Recording during Accessibility failure, and the remove/re-add/restart recovery.
  • SwiftFormat: 0/8 files reformatted.
  • SwiftLint: 0 violations.
  • 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.
  • Docs formatting: clean.
  • git diff --check: clean.
  • The full swift test run had two pre-existing environment-dependent failures outside this change: persisted device identity in GatewayChannelRequestTests and an onboarding activation-owner assertion. Neither suite references computer control, so this PR does not claim a fully green local full suite.
  • Rebase onto origin/main at a6622ddb6fd was conflict-free; git range-diff confirmed both rebased commits are patch-identical to the reviewed originals.
  • CI follow-up generated the native i18n inventory and docs map, then updated the inventory test's exact expected settings copy. Focused proof: node scripts/run-vitest.mjs test/scripts/native-app-i18n.test.ts passed 13/13; native i18n verification and docs map check both passed.
  • Fresh Codex autoreview of each CI follow-up returned no accepted/actionable findings.
  • Exact-head GitHub CI: run 30377656930 completed green for dbfc81e8cfca1e626d51f644c97f114044bd8c76 through scripts/watch-pr-ci.mjs.

@steipete steipete self-assigned this Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 16:03
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos size: M maintainer Maintainer-authored PR labels Jul 28, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 12:41 PM ET / 16:41 UTC.

ClawSweeper review

What this changes

This 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 readiness

⚠️ Ready for maintainer review - 4 items remain

Keep 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
Reviewed head: dbfc81e8cfca1e626d51f644c97f114044bd8c76
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong focused implementation, regression coverage, real-device behavior evidence, and CI support the patch; the remaining blocker is maintainer acceptance of the intentional consent-default change.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies concrete after-fix real-Mac evidence for the stale Accessibility grant recovery path, alongside focused native tests and exact-head CI; any shared proof should remain redacted of device and account details.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies concrete after-fix real-Mac evidence for the stale Accessibility grant recovery path, alongside focused native tests and exact-head CI; any shared proof should remain redacted of device and account details.
Evidence reviewed 5 items Explicit preference preservation: The PR centralizes the preference read so an absent value resolves to enabled while a persisted false remains disabled; the added settings test covers unset, false, and true states.
All central macOS consumers use the resolver: The branch replaces independent default-false reads in the app bridge host, node coordinator, and runtime capability default with the shared resolver, avoiding divergent fresh-install versus upgrade behavior.
Permission handling remains fail-closed: The new snapshot distinguishes the three macOS permission buckets but maps denied input access to unavailable responses; stale Accessibility is presented as conditional remediation rather than a permission bypass.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should existing macOS installations with no stored Computer Control preference transition to enabled on upgrade, relying on pairing and macOS TCC rather than a separate local opt-in? Confirm durable default-on consent: Approve the documented upgrade behavior: unset becomes enabled, explicit false remains disabled, and pairing plus macOS permissions remain the hard gates.

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

  • Resolve merge risk (P1) - Existing installations with no stored openclaw.computerControlEnabled value will begin advertising and accepting Computer Control after upgrade once pairing and macOS permissions permit it; this deliberately removes a local opt-in step.
  • Resolve merge risk (P1) - The change does not grant TCC permissions, but after a user has granted them a paired Gateway can drive input without per-action confirmation under the durable-consent model from the related merged work.
  • Complete next step (P2) - A protected maintainer label and deliberate consent-boundary upgrade behavior require a human maintainer to confirm product direction before merge.
Agent review details

Security

None.

PR surface

Tests 0, Docs +16, Other +285. Total +301 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 1 0
Docs 3 20 4 +16
Config 0 0 0 0
Generated 0 0 0 0
Other 9 404 119 +285
Total 13 425 124 +301

Review metrics

Metric Value Why it matters
Persisted preference default 1 changed; 0 added; 0 removed An unset existing preference changes from disabled to enabled, while stored true/false values retain their meaning.

Merge-risk options

Maintainer options:

  1. Confirm the upgrade consent posture (recommended)
    Before merge, explicitly ratify that absent stored preferences become enabled while an explicit false remains authoritative.
  2. Separate diagnostics from the default change
    If maintainers want to preserve the prior local opt-in, keep the permission snapshot and remediation while reverting the default-on behavior.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded native-app behavior and consent-default change with meaningful but non-emergency user impact.
  • merge-risk: 🚨 compatibility: Upgrading users without a stored preference receive a different effective default, so their paired Mac capability advertisement can change.
  • merge-risk: 🚨 security-boundary: The PR intentionally removes a separate local opt-in for unset installs and relies on the remaining pairing and macOS permission gates.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies concrete after-fix real-Mac evidence for the stale Accessibility grant recovery path, alongside focused native tests and exact-head CI; any shared proof should remain redacted of device and account details.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies concrete after-fix real-Mac evidence for the stale Accessibility grant recovery path, alongside focused native tests and exact-head CI; any shared proof should remain redacted of device and account details.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the related merged durable-capability-consent change and the current macOS preference and permission-diagnostic implementation; the PR body also records the product-direction decision in this area. (role: prior merged behavior owner and recent area contributor; confidence: high; commits: 938749180e4a, 252c779a5c1d, dbfc81e8cfca; files: apps/macos/Sources/OpenClaw/Constants.swift, apps/macos/Sources/OpenClaw/ComputerActionService.swift, apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-28T16:23:07.843Z sha dbfc81e :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 28, 2026
@steipete
steipete merged commit 5c6bccf into main Jul 28, 2026
112 of 122 checks passed
@steipete
steipete deleted the steipete/mac-computer-use-default-0728 branch July 28, 2026 17:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 28, 2026
…etwork-none

* origin/main:
  feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (#115280)
  fix(qa): restore full-stack scenarios and truthful suite exits (#115290)
vincentkoc added a commit that referenced this pull request Jul 28, 2026
…-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)
vincentkoc added a commit to christian-lallo/openclaw that referenced this pull request Jul 28, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant