Computer Use: per-app approvals on Mac, iPhone, Windows and Linux (cua-driver)
Lands after #28584 (cmux Remote). This branch is stacked on it, so the diff below includes #28584's commits until that merges.
Summary
Agents can use apps on macOS, Windows and Linux through upstream Cua Driver (trycua/cua, MIT, pinned cua-driver-rs-v0.34.0 / b0968e1).
- Default mode: Standard (D24).
computerUse.modedefaults tostandard, upstream's own default: no per-app question. "Ask Before Using Apps" is one setting away. Never-allowed apps (password managers, auth prompts, System Settings, terminals, cmux) stay refused in every mode. - Setup asks on enable (D25, D26). Turning Computer Use on, from any entrypoint, shows a user-only setup card:
- Device Control and Data Access (macOS 27's name for Accessibility) for cmux Remote.
- Screen & System Audio Recording for cmux Remote.
- On a Mac joined to a team: Screen sharing and Control (Settings > Devices). acpmux refuses every call with
consent_requiredwithout them. The card says these switches also let the team's machines see and control the Mac. Turn On asks for Touch ID for each switch, through the switches' own person path. A later revoke in Settings brings no card back.
- In Ask mode, the question. The first time an agent session wants an app, a cmux card asks: Allow Once, Allow for This Session, Always Allow , or Deny. The same question goes to the iPhone, and the first answer wins.
- Timing. An unanswered call fails after 2 minutes; the question stays answerable for 10.
- Enforcement. Upstream Cua Driver enforces every answer. Each agent session is an upstream
boundedsession whose app list grows only with the person's answers. No second policy engine. - Discovery before approval (D21). Agents can list running apps and windows with metadata only (names, ids, pids; never titles or pixels), so they can reach the question.
- Windows and Linux. Same architecture as macOS: a Rust cmux Remote host (
cmux-tui/crates/cmux-remote-host) on the sameremote-host-v1wire and driver commit. It has polkit and Windows Hello collectors, X11 and Wayland, and an interactive-session task on Windows. - VMs and own boxes. The owner sets the mode once with
cmux computer-use setup(elevated):unrestrictedfor disposable cmux VMs (upstream's two-part opt-in),boundedfor a user's own box. - Remote approvals.
- The device hub carries approvals to the iPhone. A box accepts an Allow only from an iPhone approval key whose fingerprint the owner pinned. That key is in the Secure Enclave and needs Face ID for every signature.
- The iPhone shows its fingerprint in Settings ā Computer Use. The hub's word alone never grants.
- Controls.
- MCP:
cua_*tools pluscua_statusandcua_approvals_list|revoke. - CLI:
cmux computer-use status|tools|call|screenshot|approvals|setup. - Palette: Computer Use: Show Status, and Revoke Saved App Approvals.
- Settings:
computerUse.modeandcomputerUse.phoneAlwaysAllow(default off). - CLI and MCP can only lower trust; raising it needs a person.
- MCP:
Design docs: docs/computer-use-approvals.md, docs/cmux-remote.md (Windows and Linux). Trust notes with recommendations: https://github.com/manaflow-ai/cmux/issues/13742#issuecomment-6623818743. Step 3's trust note: https://github.com/manaflow-ai/cmux/issues/13742#issuecomment-6648727003. The 26 design decisions (interview plus later ones) are in the proof report.
Testing
Head 3cb22674.
| Check | Where | Head | Result |
|---|---|---|---|
Fleet app build, tag cmux-next-computer-use | job 054da13330567160b5b5ae73 | 3cb22674 | passed, published to HQ |
| Setup step 3 (team consent), red | step 0b039252023b0dff4966d96d | 962ea3e6 | red: the team step, card and Turn On button don't exist |
| Setup step 3, green: ComputerUseTeamConsentTests 11 | cmux-ci step at 3cb22674 | 3cb22674 | 11 passed |
| ComputerUseRemoteSetupFlowTests 7, JoinConsentTests 41, JoinConsentInterleavingTests 1 | cmux-ci step at 86a71c0e | 86a71c0e | 49 passed |
| Setup on enable (steps 1-2), red/green | steps from the setup fix (8afed68 red, 0c20b476 green) | 0c20b476 | green; ComputerUseHelperExitTests is also red on base 84ae802 (step e0d356739cbbb6561e46cc0c) |
| CmuxComputerUseHelper, 15 suites | step 7a1bec592b7964c09f24ad80 | dd7bafbc | 110 passed |
| CmuxNext, 21 suites | step c46e77bb52b4005096e27b47 | 3607e1d1 | 114 passed; 1 also red on base (SettingsSchemaExportTests) |
| CmuxDeviceHub, 9 suites | step dc56e4535554741ac4922a2c | 3607e1d1 | 34 passed |
| CmuxRemote (incl. end-to-end mode/client) | step eecb30ec5a15674b9fba5fe9 | 3607e1d1 | 6 passed |
| Card layout red/green | steps d8f99ebc1418c07a43fdf7a0 / 9fc48905e8b8852ee6babe37 | 9d9b4a4b | red, then green |
| cmux-remote-host on Linux with the real driver, clippy, Windows-gnu clippy | rbx lane cu-integ-host | dd7bafbc | 188 passed, clean |
| Rust: approval crate, device hub client, acpmux bridge, CLI, daemon | rbx lane cu-integ | 3607e1d1 | 310 passed, clean |
| Device hub (TypeScript) | rbx | 3f84c02e | 134 passed |
| iOS simulator build + Computer Use / Screen Sharing tests | fleet sim step 9bbe73bee7e369bf6d03d2b3 | 6a0bf225 | 29 passed |
Live runs:
- Windows Server 2022, Google Cloud VM, real pinned driver (54 s video). Notepad was typed into in the background through its UI Automation element;
cmdwas refused as a terminal. The VM is deleted. - Linux X11, Freestyle Ubuntu 24.04, real pinned driver (65 s video). The editor was typed into on the VM's own desktop; the terminal was refused; discovery listed apps without titles.
- Linux X11, Freestyle VM, real pinned driver (approvals).
- The agent was refused before the grant. After "Allow for This Session" it typed into xterm and the command ran (
/tmp/cu-ok.txt=cmux-computer-use-ok). An ungranted app stayed refused. - Discovery listed apps and windows with no title. The planted title
SECRET-xclock-window-titleappeared only after the grant.
- The agent was refused before the grant. After "Allow for This Session" it typed into xterm and the command ran (
- macOS. The real approval card, from fleet build
7b7c3eae, ran on cmux minimini-cmux7sthrough the app socket.
Observed / Not run
- Observed: everything in the table above, plus the live Linux X11 runs and the Mac card captures in the report.
- Not run:
- Wayland, GNOME and KDE desktops (portal grant, polkit dialog).
- Windows Hello.
- A live device hub (not deployed).
- The real iPhone.
- A live end-to-end agent flow on macOS: no driven app, no person clicking the card.
- Setup step 3 on a real joined Mac: the macOS grants on the capture mini need a person, and the shared mini's settings file is not mine to edit. Covered by the tests above with the real
JoinConsentModel.
- Not run: the pinned-driver manifest acceptance test on macOS. It skips because no fleet worker can fetch the SDK tarball from R2. On Linux the same driver commit accepted the generated manifests live.
- No CI coverage for
cmux-tui/crates/cmux-remote-host: it is its own workspace, excluded from cmux-tui's, so no CI job builds or tests it. It ran by hand on rbx as above.
Review
Four independent review subagent rounds:
-
Review 1, at 10c092bd: FIX.
-
Review 2, at c851ab82: FIX.
-
Review 3, at 3607e1d1: FIX.
-
Focused re-reviews of the fixes: FIX at 14c06d21, FIX at 75a3cf87, then SHIP at c60cfe97 (the follow-up commits only fix tests and remove a scratch file).
-
Setup step 3 (0c20b476..8ee85c60): SHIP. A should-fix (a revoke brought the card back) was fixed in 86a71c0e; the others are follow-ups: https://github.com/manaflow-ai/cmux/pull/34913#issuecomment-6648729328
Follow-ups:
- A Mac joined with the one-line join while
labs.machineJoinis off getsconsent_required, but no card and no switches. It fails safe. - A Turn On that fails shows its error only in Settings.
No review found a path that turns Computer Use on or approves without a person. Every finding is fixed or listed as a follow-up in the report.
Review (subagent): SHIP at c60cfe97b0a64659b95a1b0dbe6947e37869dcf6
Changelog
Added: Computer Use for agents on the Mac, Windows and Linux. Turning it on walks through the macOS permissions (and, on a team Mac, Screen sharing and Control). An optional Ask mode asks before an agent uses each app (Allow Once, Allow for This Session, Always Allow, Deny), answered on the Mac or the iPhone.
Proof
Proof report (all 26 design decisions, the security model, screenshots and video for macOS, iPhone and Linux, all builds, tests and reviews): a self-contained HTML file on the author's machine at worktrees/cmux-next-computer-use/.cmux-scratch/computer-use/computer-use-report.html in cmuxterm-hq (publishing it as an artifact needs a claude.ai login in that session).
No capture: cmux-ci capture could not lease a capture mini from this Mac (SSH key refused), and Blacksmith macOS had no runner (run 41765558711). Real captures of fleet builds on cmux mini mini-cmux7s (app socket debug.window_snapshot) are in the report.
š¤ Generated with Claude Code