Skip to content

cmux NEXT Cloud: Release copies your Claude login to your own machine after a one-time consent, behind a remote off switch (step B) - #33324

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

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

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Step B of shipping the Mac-to-machine Claude login copy in Release (step A: #33061). 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."

What

  • Re-pins CCmuxAppFFI to cmux-app-ffi-a86fae37df02 (cmux-cloud-start-core: Release login copy after a one-time consent, behind a remote switch, owner machines only (step A) #33061's rules: ask-consent, remote-switch-off, consent-declined, owner-only in Release).
  • The one-time consent (CloudPresenter.confirmLoginCopy): "Use my Claude login on my own Cloud machines?" with Use My Login / Don't Use. It shows only where a copy would happen (signed in, the platform says the caller owns the machine, an owner guest, no working login there). The answer is the person's, kept in cmux.json as cloud.useMyClaudeLoginOnMyCloudMachines. Agents are refused (privacy). Settings > Machines > Cloud Workspaces turns it off or on again. A yes is the confirm, so no second prompt follows.
  • The remote switch (CloudHarnessLoginCopySwitch, CmuxNextCloud): GET /v1/cloud/harness-login-copy on the owner API (cmux-platform#587, forwarded by cmux-api: forward the Cloud login copy switch to the platform #33063), read fresh before every Release copy, with a 5 s deadline and a TTL capped at 5 minutes. Failed, unread or stale counts as off. Off skips the copy (remote-switch-off in the start record), and the chat's card offers the machine's own one-click "Sign in to Claude" (acpmux agent_login).
  • The turn card's recovery in Release: Claude only, the switch read fresh, then the consent. An automatic recovery never asks, and copies only with consent already given. The creator's team-guest allowance (allowsCreatorTeamGuestHere) stays DEV and NIGHTLY only.
  • DEV and NIGHTLY behave as before.

Risk: trust-sensitive (it moves a subscription token). The token still goes only Mac to machine disk over the existing machine file route or direct provider session. Audited: nothing on the classic /api/vm route, cmux-tui cloud machine-io or cmux-platform MachineGuest logs or stores it (cmux-platform#587 adds tests).

Design: leo-workspace design/cloud.md, "Subscription logins", rule 4.

Test

  • Fleet app compile check (recipe 2).
  • CloudStartChatLoginTests (Release gate, consent and switch through the FFI) and CloudHarnessLoginCopySwitchTests (decode, TTL cap, stale is off).

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

Enables Release builds to copy the user's own Claude login from their Mac to Cloud machines they own, after a one-time consent, while a remote off switch is on. Previously this was DEV and NIGHTLY only.

  • A "Use my Claude login on my own Cloud machines?" prompt asks once; only the person's own cmux.json can say yes — any managed layer (MDM, team policy, defaults) holding the key is no, whatever its value. Settings > Machines can turn it off or on again.
  • A remote switch (GET /v1/cloud/harness-login-copy) is read fresh before every copy and rechecked right before the login is written; unread, failed, or stale counts as off, and the machine's chat then offers one-click "Sign in to Claude".
  • Copies go only to owner guests of machines the caller owns; team guests never receive it in Release, and the new-workspace setup gates on the switch too.
  • DEV and NIGHTLY builds behave as before.

Written for commit 4c1c964. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 4 commits November 3, 2026 00:06
…n 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
…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
@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 4c1c964: 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=pr33324 -f ref=cloud-login-copy-consent-swift -f platform=macos -f backend_mode=local

red: cmux-next crash ratchet; NEW: green on the base 1a7e2c1; do not merge until green; see lane-rules

Default changes

This pull request changes 1 default at 4c1c964df2e8 (what everyone gets without configuring anything):

  • setting.cloud.useMyClaudeLoginOnMyCloudMachines: (none) -> false (a new setting, off by default: passes on its own)

Every change is a new setting that defaults to off, the behavior from before it existed.

Merge receipt: merged as 84aa409a31c1 with these defaults changed, signed off by review (codex gpt-6-astra high, direct codex exec).

Regenerate the snapshot with python3 scripts/ci/defaults_guard.py snapshot.

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
…e; 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
teamleaderleo and others added 2 commits November 3, 2026 00:57
…he copy (review); settings exports

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

blacksmith-sh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
nightly preparation must run on Blacksmith Linux, keep its fallback, and reuse a succes
sful artifact/
nightly preparation must run on Blacksmith Linux, keep its fallback, and reuse a succes
sful artifact
View Logs

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

…n 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
@cursor

cursor Bot commented Nov 3, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol high, sweep, via the review router; full diff from merge base 098e7f2 to this head): BLOCK at 31188af

No P1/P2 findings.

teamleaderleo and others added 2 commits November 3, 2026 01:34
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
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, direct codex exec): SHIP at 4c1c964

Checked: a key any managed source holds is now no, so a team false under an MDM true can't consent; Release copy paths need consent, a fresh switch read before the write, and an owned machine; Codex excluded in Release; no token logging. Compile check passed; CloudLoginCopyConsentSetting, CloudStartChatLogin, CloudHarnessLoginCopySwitch, CloudCredentialTransfer and SocketSettingsWrite suites pass at this head.

Follow-ups: an integration test through real file/team/MDM layers into managedKey(forPath:); hide the Release wizard's Codex option.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over.


Leo answered the Release question for this PR (asks cluster c-6920a262ef). Asked "should the direct copy from your Mac ship in Release builds?", he said:

i feel like... worst case we can ask for forgiveness...? hm... like this oauth token is a relatively known thing, no?

That reads as yes, ship it in Release behind the consent prompt and the remote switch. Please add Leo-ask: ask-6920a262ef to the body.

One red here is this PR's own. cmux-next crash ratchet (run 41612104549) reports swift CmuxNextCloudCredentials: async_closure_default_arg: head 1, base ok, so there's a new async closure default argument in CmuxNextCloudCredentials. The other reds (release-notary, Guard status) are nightly-guards jobs.

@teamleaderleo
teamleaderleo merged commit 84aa409 into feat-cmux-next Nov 3, 2026
232 of 244 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-login-copy-consent-swift branch November 3, 2026 10:48
teamleaderleo added a commit that referenced this pull request Nov 3, 2026
… async closure (crash ratchet, from #33324) (#33650)

Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@cmux-bot cmux-bot Bot removed the stack-blocker label Nov 3, 2026
lawrencecchen added a commit that referenced this pull request Nov 3, 2026
…' CloudLoginCopyGate, its consent dialog CmuxNextCloudUI's (arch app_lines +141 from #33324) (#33844)

#33324 (84aa409) added 141 CmuxNextApp lines for the Release copy of the
person's Claude login. The rules (switch first, then the consent, asked once;
automatic recoveries never ask; Claude only; the transfer's last check) move to
CmuxNextCloudCredentials as CloudLoginCopyGate; the build gates
(offersLoginCopy, allowsCreatorTeamGuest) to CloudCredentialTransfer+Switch;
the one-time consent dialog's spec and its 5 keys (every locale unchanged) to
CmuxNextCloudUI as CloudLoginCopyConsent. The App keeps the wiring: reading the
switch, cmux.json and presenting the dialog (CloudStartChat.loginCopyGate).
Same decisions in the same order. CmuxNextApp -77.
New test CloudLoginCopyGateTests pins the gate's rules.
@lawrencecchen

Copy link
Copy Markdown
Contributor

Swift logic follow-up (tip watcher swift-logic row, STATUS 13027 "SWIFT LOGIC CULPRITS"; lead order).

This PR raised swift_logic_lines by +165 at its merge commit 84aa409: scripts/cmux-next/swift-logic-lines.py before and after the merge, with the same table (the tip's, c6be943). The largest declarations of the rise:

  • class CloudHarnessLoginCopySwitch in Packages/macOS/CmuxNext/Sources/CmuxNextCloud/API/CloudHarnessLoginCopySwitch.swift: +38 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)
  • extension CloudOwnerAPIClient in Packages/macOS/CmuxNext/Sources/CmuxNextCloud/API/CloudHarnessLoginCopySwitch.swift: +30 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)
  • extension CloudStartChat in Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartChat+Login.swift: +30 lines counted as Swift logic (its row counts it as logic)
  • struct CloudLoginCopyConsentSetting in Packages/macOS/CmuxNext/Sources/CmuxNextSettings/CloudLoginCopyConsentSetting.swift: +28 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)

plans/cmux-next/layer-ownership.md says Rust owns every state, list and rule and Swift is the platform shell. Please move the new logic of this PR in a follow-up: to Rust (the crate that owns the area; the owner lists in STATUS 12147-12165 name the target per area), or at least out of the app into its package. If a declaration above is platform code (AppKit, Core Animation, OS calls, strings, tokens, DEBUG tooling), reply here and the table gets a PLATFORM row with your reason instead.

The swift-logic row is a report, not a gate: nothing blocks on this comment.

This branch was previously deployed

3 inactive deployments
ci-routing-agent — 4c1c964d Deployed Nov 3, 2026 by github-actions[bot] via cmux-next macOS placement #65701
artifacts — 4c1c964d Deployed Nov 3, 2026 by teamleaderleo via publish tree-addressed cmux-tui #105230
sentry-dsyms — 4c1c964d Deployed Nov 3, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #105230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants