Repository navigation
Cloud relay chat: give the machine the person's harness login before the send - #36846
Merged
Merged
Conversation
… step first Fails on base: bindRelayChat sends with no login step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
… the send bindRelayChat now runs passHarnessLogin (the start-session login step) before relay.chat and relay.answer. A login the rules refuse, a Claude machine still without a login (no cached login on this Mac), or a failed copy sends nothing and answers undelivered with cloud.relay.login_refused, login_missing or login_failed. The binding moves to CloudStartSession+RelayChat.swift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…declined copy sends nothing A CLI or MCP relay chat answers within the action's result deadline: a login step still running after loginWithin answers cloud.relay.login_pending and never sends, and the turn gets what is left of answerWithin. A copy the person declined on a machine with no login answers login_missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…7eecd6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Collaborator
Author
|
Owned by an agent session · session |
…-login test's wording check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…hat recovers 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
temporarily deployed
to
ci-routing-agent
November 5, 2026 22:38 — with
GitHub Actions
Inactive
…to the link path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…fallback send cloud.relay.login_* with delivered:false came back to start-chat as a plain undelivered answer, so it fell back to start-session and the link path, which sent the prompt to the same signed-out agent. It now answers the app's typed code, message and recovery command (exit 75 for login_pending, else 1) and runs nothing more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 5, 2026 22:40 — with
GitHub Actions
Inactive
…with no fallback send" This reverts commit 73a5537. Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…ls back to the link path" This reverts commit a88e179. Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…chat-harness-login # Conflicts: # Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartChat+Login.swift
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
temporarily deployed
to
ci-routing-agent
November 5, 2026 22:59 — with
GitHub Actions
Inactive
teamleaderleo
added a commit
that referenced
this pull request
Nov 5, 2026
…ror fields go into its moved relayFields Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-af5b6ebb55d7d78810d2
teamleaderleo
added a commit
that referenced
this pull request
Nov 5, 2026
…s outcome is not a #36846 refusal) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-af5b6ebb55d7d78810d2
teamleaderleo
added a commit
that referenced
this pull request
Nov 5, 2026
teamleaderleo
added a commit
that referenced
this pull request
Nov 5, 2026
…n+RelayChat.swift (its arch exception's reason and receipt) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-af5b6ebb55d7d78810d2
…lls back to the link path" This reverts commit acc4b67. Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
… with no fallback send" This reverts commit a3fa000. 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
…n+RelayChat.swift (its arch exception's reason and receipt) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-af5b6ebb55d7d78810d2
…ne/cae-composed) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 5, 2026 23:08 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 05:34 — with
GitHub Actions
Inactive
…chat-harness-login
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 07:12 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 07:12 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
cmux-next-cloud-journey
November 6, 2026 07:12 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
sentry-dsyms
November 6, 2026 07:24 — with
GitHub Actions
Inactive
Collaborator
Author
|
Review (codex gpt-6-astra high, router-review): BLOCK at 3e90016 BLOCK at 3e90016 Visual verdict: no images; Leo tries the build
|
…ision relayLoginRefusal returned nil before it read ownership when no login step decided anything (pi, or the transfer gate off), and refused unknown only on the Claude caller-not-owner skip: a team or unknown machine, or one with no link, still got the send (review21 F1 at 3e90016). Now team refuses with login_team_machine and unknown with login_unverified for every agent; only an owner goes on to the login checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 08:15 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 08:15 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 08:16 — with
GitHub Actions
Inactive
…chat-harness-login # Conflicts: # Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartChat+Login.swift
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 08:49 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 08:49 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
cmux-next-cloud-journey
November 6, 2026 08:49 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
sentry-dsyms
November 6, 2026 09:00 — with
GitHub Actions
Inactive
…login recovers with --login none review23 at a54d3d1: F1 (blocking) a login step recorded cancelled matched no refusal and the prompt was sent; it now refuses with cloud.relay.login_cancelled and the start-session command. F2: machine-login-missing's command kept the machine choice and was refused again; it now ends in --login none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 6, 2026 09:15 — with
GitHub Actions
Inactive
…FFI pin cmux-cloud-start-core is an input of the CCmuxAppFFI pin, so a test-only change there failed "Check the app FFI pin". vm_kind::read is unchanged; the unknown answer stays covered by the server's connect_owner tests and the app's CloudAppLinkOwnerAnswerTests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Bugbot needs on-demand usage enabledBugbot 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. |
This was referenced Nov 6, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cmux cloud start-chattries the relay first (#35829), butcloud relay-chat(CloudStartSession.bindRelayChat) sent the prompt without the login step thatcloud start-sessionruns before its start. So a chat started from the CLI reached a guest with no Claude login, and production answered "Claude is not signed in here".Leo: "we have the daemon, we have the token, we have the thing that can just send it over the authentication. So why are you still getting stuck on this? ... just fix it"
Before
relay.chat(the person's palette run) andrelay.answer(CLI and MCP runs), the relay path now does what start-session does, in the same order:passHarnessLoginon theCloudMachineSessionthe relay already resolved.The account that asked is checked before the link, again after the link and before the login, after the login, and right before the send. The step reuses the existing credential route, and no field or log line holds a token. The decision log line has verdicts only: link state, owner answer, guest kind, and whether the cache was queried.
If anything other than a usable login comes out of these steps, nothing is sent. A CLI or MCP run gets back a typed answer with
delivered: falseand the start-sessioncommandthat recovers.cloud.relay.machine_not_readycloud.relay.not_connectedteam)cloud.relay.login_team_machineunknown: no link, or the app server could not read it)cloud.relay.login_unverifiedcloud.relay.login_skipped--login machinewith none there, Release consent)cloud.relay.login_refused+login_reason; with no choice, the command adds--login none(a bare rerun refuses again), whose chat's Sign in to Claude card signs incloud.relay.login_missingcloud.relay.login_declinedcloud.relay.login_failed, with the copy's fixed text onlycloud.relay.login_account_changedcloud.relay.login_pendingOwnership has three states end to end. The app server's
cloud.machine.connectanswersvm_kindfrom the Worker's own word:ownerandteamonly on those exact values. It answersunknownfor an absent or other value, or for a transient owner read, and that answer is never cached. A machine that is gone or out of reach still refuses the connect. The catalog and the generated app contract gainunknown. On the Mac,CloudLinkSession.callerOwnershipreads owner, team or unknown, and onlyownergrants anything. A team machine the caller made (linkowner, guestteam) goes the owner way: its own working login sends, and none giveslogin_missing.Rust
cmux cloud start-chatanswers any undeliveredcloud.relay.login_*as that typed error with its recovery command (exit 75 forlogin_pending, else 1), and runs nothing more. Any other undelivered answer (machine_not_ready,not_connected, an app or machine without the relay) still falls back to start-session on that machine.An honest limit: a cold machine whose link comes up and whose owner answer is
ownernow gets an owned login and a reply over the relay. If the link can't come up or the owner answer can't be read, the run gets the typed recovery above, not a signed-in reply.The binding moves out of
CloudStartSession.swift(over its file cap) intoCloudStartSession+RelayChat.swift. The visible composer (CloudStartChat.runHome) and thedaemon_closedfailure after 102.7 s are owned elsewhere and aren't touched here.Changelog
Fixed: A chat that
cmux cloud start-chatsends over the Cloud relay now connects to the machine and gives it your Claude login first, or says why it can't and sends nothing, instead of reaching a Claude that isn't signed in.Testing
The regression (test only, bf5eca7) is
CloudRelayChatLoginTests/aCLIRelayChatRunsTheHarnessLoginStepFirst. It drives the app's realcloudRelayChatbinding and real login step on a fresh running machine. It was red at bf5eca7 in cmux-ci step c74bca804c818c3a70835cda.At the head 614ec92 (tree 9810f479, one merge of feat-cmux-next):
connect_ownerpassed 16/16,cmux-cloud-start-core vm_kindpassed 6/6, andcmux-tui cloud_start_chat::testspassed 39/39. The fullcheck-app-platform.shpassed, including the generated contract and the runtime sync.CloudRelayChatLoginTestsbinds the real action with fixture stand-ins for the login step and for the relay's HTTPS transport, and records the order of the steps:not_connected;login_pending);Reviews over the merge-base range found and fixed:
Two reviews (at 7e77e41 and 14c5ed6) blocked on a claim that
CloudCallerOwnershiplacksEquatable. A raw-value enum with no associated values gets it synthesized, and the exact trees compiled and passed (answered in this PR's comments).Review (codex gpt-6.1-sol xhigh): SHIP at 614ec92.
Observed / Not run
Observed: the fleet runs above. Not run: a live Cloud machine. The real ownership and copy calls are stood in for in these tests; their own suites cover them.
Agent session: agent session
🤖 Generated with Claude Code