cmux Remote: one daemon-supervised signed host for Computer Use and Screen Sharing
Summary
cmux Remote: one signed process, supervised by the cmux-tui daemon, holds macOS's Accessibility and Screen Recording for cmux Computer Use and cmux Screen Sharing, so a grant never needs a relaunch of cmux (a new grant restarts only the worker that needs it). Design: docs/cmux-remote.md.
cmux.app ── cmux-tui daemon ── cmux Remote host (responsibility disclaimed: grants are cmux Remote's)
├─ Computer Use worker (upstream Cua Driver in process)
└─ Screen Sharing worker (this Mac on the device hub; banner, indicator, sessions)
Lands dormant. Everything is behind the new setting remote.enabled (default off, read at launch). Off, cmux behaves as before: Computer Use keeps its current helpers and computerUse.driver default (unchanged), Mac Screen is hosted by the app as today, and no cmux Remote process starts (the daemon refuses every host request while nothing is turned on). Turning it on routes Computer Use (driver Upstream) and Screen Sharing through cmux Remote.
- Host package
Packages/macOS/CmuxRemote: host (supervisor socket that admits only the daemon serving the recorded socket, app socket for the app's own process, permission probe in a fresh process, Accessibility change notification, Quit & Reopen turned into a worker restart), Computer Use worker (helper v2 engine, unchanged wire), Screen Sharing worker (device hub identity, approval banner, menu bar indicator,ScreenStreamHostsessions; consent closed until the app tells it). - Daemon
cmux-tui-core/src/remote_host*: stages a verified copy outside the app, starts it throughcmux_processwith the newdisclaim_responsibility(), adopts a live host after a handoff, restarts with backoff, replaces an idle host of another build and waits while a session runs. Commandsremote-host-status|call|config|app(remote-host-v1, in the SDK schema, inventory, bindings andspec/commands.md). - Device hub (
workers/device-hub, not deployed): device-key renewal,POST /v1/auth/device/anchor+POST /v1/auth/devicegive an anchored Mac a host-scoped 1 h session with the app quit; a host session may only lower access and act on its own host sessions; anchors end on sign-out, removal, sharing off, or after 30 days. Trust note: https://github.com/manaflow-ai/cmux/issues/13742#issuecomment-6535617884 - Controls: settings
remote.enabled,remote.endSharingOnQuit(both default off, user-only), palette (cmux Remote: …, Share This Mac, Turn Off Sharing This Mac, Set Device Access…), CLIcmux remote-host status|refresh|request|open-settings|restart|share|access|stop, MCPremote_*tools. Turning sharing on or raising a device from CLI/MCP asks the person on a cmux dialog (remote.confirm). - Identity:
cmux Remote (dev).app/com.cmuxterm.remote.devwith iconResources/CmuxRemote.icon; build, sign and embed scripts. The dev pin (cmux-remote-dev.pin.json) lands in a follow-up once the signed bundle is published to R2 (the store check needs the R2 object; no write key was available), so DEV builds embed nothing until then. - iOS: the hub session flow, ticket signaling and ScreenStream wire are unchanged; #27706's host input changes are used as-is.
Changelog
none (default off; enabled by a setting in a later change)
No capture: the new UI (approval banner, menu bar item) runs in cmux Remote only with remote.enabled on and the macOS grants given; with the default off nothing visible changes.
Observed / Not run
Observed:
RemoteHostProcessTestspass on the fleet (daemon hello, protocol negotiation, a non-daemon peer with the right secret refused, adoption after the supervisor link ends, drain, no-bootstrap exit).- device hub
tsc --noEmitandvitest run103/103 (renewal, host scope lowers only, host-only sessions) on rbx. cargo clippy -D warningsandcargo test -p cmux-tui-corefilter clean on rbx at 294968d1.cmux-ci compile-check --app --package CmuxRemote --recipe-version 2passes (app, CmuxRemote, cmux-tui macOS check);cargo clippy -D warningsclean on Linux for cmux-process, cmux-tui-core, cmux-tui; panic ratchet: no new hits.- SDK schema, spec inventory and binding generation checks pass.
- Live, on a fleet build of an earlier head (cmuxremote5/6) on a cmux mini and on a Mac of the user: the daemon stages and starts cmux Remote outside the app, the host runs the Computer Use and Screen Sharing workers,
cmux remote-host status|requestwork, macOS lists com.cmuxterm.remote.dev, and an agent lists Computer Use tools through cmux Remote.
Not run: - Computer Use screenshot/click and Screen Sharing end to end through cmux Remote, grant without relaunch, headless sharing, iPhone viewer: the grants were not given on a test Mac yet.
- The device hub change is not deployed.
CI at 290b2c0b
- Required
clippy (changed cmux-tui packages), app compile, Release compile, cmux-next checks, fast tier, guards: green. - Reds not from this change:
Native/OptChat/optchat-chieffails the same tests on the base tip b84aa3de (rbx) and passes at this head on rbx; swift test's sidebar band row / machine color tests fail on the base commit 259be5c5 too (fleet steps 2888da85e6a74fb073046a59);exportIsFreshdiffers only in base actions (browser profile, cloud, sidebar), which the autofix regenerates. cmux Remote's exports match.
Review
Independent review (Fable 5.1 subagent), re-run on each head:
- 1be21d90 BLOCK → fixed in 773435dc; 773435dc BLOCK (status
indicatornamed the viewer) → fixed in 294968d1. - Later heads (gitlink back to base, arch exception, localization omissions, api-compat snapshot, panic ratchet, CI guards, no process scan, capability export, action surfaces): SHIP each.
- Advisory follow-ups: prune of a busy host's staged slot after two upgrades in one session; a
strip_privateunit test; cmux Remote actions list under the palette's "Remote Machines" section.
Review (Fable 5.1 subagent): SHIP at 290b2c0b999afabf5027126fe582837f39a36289
🤖 Generated with Claude Code