Skip to content

Cloud: cmux cloud start-session gives its machine the Claude login - #32052

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
lane/cloud-start-session-login
Nov 2, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
lane/cloud-start-session-login

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

cmux cloud start-session --agent claude started Claude on a Cloud machine that had none of the person's Claude login, so every turn answered "The provider rejected Claude Code's credentials on this Cloud machine." This happened even in a run whose app held the login: the cmuxterm-hq cloud-start-session capture (run 41415284694, with claudeLogin set by cmuxterm-hq#6219).

The composer's Cloud start already passes the login (CloudStartChat+Login, #29771, #29962, #31183, #31264): DEV and dogfood builds only, on a machine the person owns, and recorded on the machine's harness_login row. start-session never took that step. It now runs the same step after the machine connects and before the session starts. passHarnessLogin now takes a harness name, so both entry points share one path.

CmuxNextApp line count is unchanged. The ratchet was paid by removing a redundant local and merging two declarations in CloudStartSession.run.

Changelog

Fixed: In DEV builds, cmux cloud start-session gives the Cloud machine your Claude login, the way a composer Cloud start does.

Test

cmux-ci run --class light --script scripts/ci/package-test-lane.sh --arg=suite --arg=Packages/macOS/CmuxNext --arg=CloudStartSessionTests ...

  • Red at 7f96a7a (test only): fails on base, since CloudStartSession has no login step.
  • Green at the head: results below once the fleet run ends.

Observed / Not run

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes cmux cloud start-session so the Cloud machine gets the person's Claude login before the session starts, matching a composer Cloud start. Previously a Claude session on a machine without the login answered every turn with the provider's credentials rejection.

  • passHarnessLogin now takes a harness name, so CloudStartChat and CloudStartSession share one login path.
  • The step runs after the machine connects, before the session starts, and only in DEV and dogfood builds. The run re-checks the asking account after it, since the login can wait on a confirm.

Written for commit 6a078b3. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 4 commits November 2, 2026 01:11
The composer Cloud start passes the person's Claude login to the machine
(CloudStartChat+Login) before the first prompt; start-session never did, so a
Claude session it started on a machine with no login answered with the
provider's credentials refusal. It now takes the same step after the machine
connects and before the session starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 6a078b3: 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=pr32052 -f ref=lane/cloud-start-session-login -f platform=macos -f backend_mode=local

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at 101d2cc

BLOCK at 101d2cc

Visual verdict: no images; Leo tries the build

  1. [P1] [blocking] Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartSession.swift:187 — After the new awaited login step, run no longer checks the captured account before opening the remote tab. passHarnessLogin catches cancellation and returns false, so a sign-out or team switch during login can leave this run continuing and starting a session under the wrong account. Add try still(name) immediately after the await and cover account change during login with a regression test.

teamleaderleo and others added 2 commits November 2, 2026 01:21
Review (gpt-6-astra) at 101d2cc: the login may wait on a confirm and swallows
cancellation, so the run must check its account after it, as after every wait.

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

Copy link
Copy Markdown
Collaborator Author

Capture cloud-start-session at 6a078b3313f7. Every step passed: cmux cloud start-session --agent claude on a Cloud machine, then Claude answered cloud chat ok. At #31969's head (before this fix), the same capture showed the credentials refusal card.

Light Dark
light dark

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 6a078b3

Reviewer: codex gpt-6-astra high, fast tier.

Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at 6a078b3

Visual verdict: no images; Leo tries the build

No correctness findings in the changed flow. The focused suite could not run because this box has no Swift toolchain.

Follow-ups: [P2] [follow-up] No after screenshots were provided for this Cloud flow.

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 6a078b3: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo
teamleaderleo merged commit a2657d1 into feat-cmux-next Nov 2, 2026
159 of 163 checks passed
@teamleaderleo
teamleaderleo deleted the lane/cloud-start-session-login branch November 2, 2026 09:46
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Red/green on the fleet (scripts/ci/package-test-lane.sh, CloudStartSessionTests + CloudStartChatLoginTests + CloudStartChatMachineTests):

  • Red at 7f96a7a (test only): the test target fails, because start-session has no login step (step 2b395c216ff0e08f4ce32378).
  • Green at 6a078b3: all 3 suites pass (step 601a9c42ad94cdbf56d8a673).
  • The capture above, at the same head, shows Claude's reply on the machine.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 6a078b33 Deployed Nov 2, 2026 by teamleaderleo via namespace autofix #12208
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.

1 participant