cmux-cloud-start-core: Release login copy after a one-time consent, behind a remote switch, owner machines only (step A)
Step A (Rust only) of shipping the Mac-to-machine Claude login copy in Release. Leo (2026-11-02), approving it on three conditions:
- "Consent first. It's on only after a clear one-time prompt: 'use my Claude login on my own Cloud machines'."
- "Your token only: your own token, to your own machine. Never stored by us, never on team machines, never shared."
- "A remote off switch, so if Anthropic objects we turn it off for everyone within minutes and fall back to the one-click sign-in."
Stacked on #32869 (its Choice, Step::Refuse and Reason::InstallChosen); the diff shrinks to this PR's two commits once #32869 lands. #33006 (Release never copies) is already in base; this keeps DEV and NIGHTLY exactly as #33006 left them and adds the Release path beside it.
What
cmux-cloud-start-core::harness_login (op cloud_harness_login, two new optional inputs, so today's app is unchanged):
remoteSwitch: the API Worker's switch (GET /v1/cloud/harness-login-copy, cmux-platform). A Release build (dogfood: false) passes a login only while it istrue; absent, unread or stale is off. Off givesskip (remote-switch-off), and the machine's chat offers the one-click "Sign in to Claude" (acpmuxagent_login).cmux.cloud.passHarnessLogin = NOstill turns it off. Newrelease_passes_harness_login(setting, remote_switch).consent: the person's answer to the one-time prompt, kept on the Mac. Never asked gives the new stepask-consent(reasonconsent-first), and only where a copy would actually happen (signed in, the platform says the caller owns the machine, anownerguest, no working login there). Yes installs with no second prompt (install-chosen, orinstall-cached). No givesskip (consent-declined). A headless run refuses instead of waiting on a prompt nobody sees. Neither--login passnor a kept choice stands in for the consent.- Release copies only to an
ownerguest. The creator'steamguest (DEV and NIGHTLY, Leo 2026-11-01) isguest-not-owner/skippedTeamMachinein Release. - The record line adds
, release consent yes|no|-, switch yes|no|-on Release starts.
The Swift side (the prompt, the Settings toggle, the switch read, the FFI re-pin) follows in step B once app-ffi-release publishes this commit.
Test
Fleet (cmux-ci test, Linux): cargo fmt --check -p cmux-cloud-start-core, cargo test -p cmux-cloud-start-core (43 passed), cargo test --manifest-path crates/cmux-layout-reducer-ffi/Cargo.toml --test cloud_harness_login (13 passed), cargo clippy -p cmux-cloud-start-core --all-targets -D warnings. New: release_copies_only_with_the_switch_on_and_the_persons_consent, release_never_copies_to_a_team_or_shared_machine, the_release_record_says_consent_and_switch, FFI a_release_start_reads_the_switch_and_the_consent.
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Step A (Rust only) of shipping the Mac-to-machine Claude login copy in Release. A Release build now copies a login only when the person consented once, the remote switch is on, and the machine is the caller's own; without consent or with the switch off it falls back to the one-click sign-in and the machine stays as it is. The switch and setting hold a pre-resolved Release request too (one sent without a dogfood field). The login is never stored on cmux servers: the old platform-side harness login sync is removed and its state file is dropped at start. DEV and NIGHTLY behave exactly as before.
- New
askrules decide who may answer a Cloud start ask: only the person (a CLI request with no agent session) may answer Start unless the person delegated it; a headless run refuses instead of waiting on a prompt nobody sees. - The record line adds
, release consent yes|no|-, switch yes|no|-on Release starts.