Skip to content

cmux-cloud-start-core: Release login copy after a one-time consent, behind a remote switch, owner machines only (step A) - #33061

Merged
teamleaderleo merged 16 commits into
feat-cmux-nextfrom
cloud-login-copy-consent
Nov 3, 2026
Merged

teamleaderleo merged 16 commits into
feat-cmux-nextfrom
cloud-login-copy-consent

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Step A (Rust only) of shipping the Mac-to-machine Claude login copy in Release. Leo (2026-11-02), approving it on three conditions:

  1. "Consent first. It's on only after a clear one-time prompt: 'use my Claude login on my own Cloud machines'."
  2. "Your token only: your own token, to your own machine. Never stored by us, never on team machines, never shared."
  3. "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 is true; absent, unread or stale is off. Off gives skip (remote-switch-off), and the machine's chat offers the one-click "Sign in to Claude" (acpmux agent_login). cmux.cloud.passHarnessLogin = NO still turns it off. New release_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 step ask-consent (reason consent-first), and only where a copy would actually happen (signed in, the platform says the caller owns the machine, an owner guest, no working login there). Yes installs with no second prompt (install-chosen, or install-cached). No gives skip (consent-declined). A headless run refuses instead of waiting on a prompt nobody sees. Neither --login pass nor a kept choice stands in for the consent.
  • Release copies only to an owner guest. The creator's team guest (DEV and NIGHTLY, Leo 2026-11-01) is guest-not-owner / skippedTeamMachine in 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
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 ask rules 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.

Written for commit 2d56c96. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 13 commits November 2, 2026 18:11
…ess login choice (--login pass|machine|none, kept per user, headless refusal), over the app FFI (step A)

The CLI's dialog answers say where they come from (origin cli|mcp, and the
agent caller), so the app can tell the person's terminal from an agent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…des before reading the owner or guest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
… never runs in Release

Leo (2026-11-02): "yeah that should be fine right? cuz man i dont wanna be liable for peoples' subscription tokns"

- cmux-host: remove the harness login sync (#30318) that sent a person's Claude/Codex
  login to the platform's /v1/harness-credentials store and wrote it on their next
  machine. Its old state file (fingerprints only) is removed at start.
- cmux-cloud-start-core passes_harness_login: dogfood && setting.unwrap_or(true), so
  cmux.cloud.passHarnessLogin can turn the copy off in DEV/NIGHTLY but never on in Release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…ot (review follow-up)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…ows a remote switch, and goes only to the person's own machine

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

…-copy-consent

# Conflicts:
#	cmux-tui/crates/cmux-cloud-start-core/src/harness_login.rs
#	cmux-tui/crates/cmux-cloud-start-core/src/harness_login/tests.rs
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 2d56c96: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr33061 -f ref=cloud-login-copy-consent -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@github-actions github-actions Bot added the risk:high Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_event_stream_drift_is_rejected (main.InventoryContractTests.test_event_stream_
drift_is_rejected)/
test_event_stream_drift_is_rejected (main.InventoryContractTests.test_event_stream_
drift_is_rejected)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…switch too (review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, direct codex exec; the review router had no live host): SHIP at 2d56c96

The earlier BLOCK at 7c448c7 (a pre-resolved request with release and gate but no dogfood skipped the switch) is fixed: the switch and setting are checked whatever gate says, with Rust and FFI tests. Checked the Release gate (absent/false/stale switch is off, setting NO is off), that consent cannot be bypassed by --login pass, a kept choice or headless, owner-only in Release, dogfood unchanged, and optional wire fields.

Visual verdict: no UI in this diff.
Follow-ups: none.

@teamleaderleo
teamleaderleo merged commit a86fae3 into feat-cmux-next Nov 3, 2026
163 of 175 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-login-copy-consent branch November 3, 2026 07:45
teamleaderleo added a commit that referenced this pull request Nov 3, 2026
…8cef3d2733aad7c61 (#33061's Release login rules)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo added a commit that referenced this pull request Nov 3, 2026
… after a one-time consent, behind a remote off switch (step B) (#33324)

* cmux NEXT Cloud: Release copies the person's Claude login to their own machine after a one-time consent, while the remote switch is on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* CmuxNextCloud: the switch uses CmuxNextCompat's Mutex (macOS 14)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* cmux NEXT Cloud: no async call in an autoclosure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* cmux NEXT: re-pin CCmuxAppFFI to cmux-app-ffi-a86fae37df02e084c26276b8cef3d2733aad7c61 (#33061's Release login rules)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* cmux NEXT Cloud: recheck the switch and consent right before the write; the wizard asks too; parent-object settings writes keep a leaf's policy (review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* cmux NEXT Cloud: the setup wizard reads the switch before it offers the copy (review); settings exports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* cmux NEXT Cloud: only the person's own cmux.json says yes to the login copy; managed values can only say no (review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* Login copy consent: a key any managed source holds is no

An organization or a script never consents for the person: a team false
under an MDM true merges to true, so the effective value can't carry the
denial. Any managed layer holding the key now withholds consent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

3 inactive deployments
artifacts — 2d56c967 Deployed Nov 3, 2026 by teamleaderleo via publish tree-addressed cmux-tui #104479
sentry-dsyms — 2d56c967 Deployed Nov 3, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #104479
ci-routing-agent — 2d56c967 Deployed Nov 3, 2026 by teamleaderleo via cmux-tui tree preflight #104479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant