Skip to content

fix(cmux-next): recover Cloud agent authentication safely - #26148

Merged
teamleaderleo merged 19 commits into
feat-cmux-nextfrom
cloud-setup-auth-error
Oct 27, 2026
Merged

teamleaderleo merged 19 commits into
feat-cmux-nextfrom
cloud-setup-auth-error

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

HOLD: Webview merges wait for the base react-apps-check suite to restore test signal.

Cloud authentication errors identify missing, expired/revoked, or rejected credentials and offer confirmed setup for the current chat's VM. Native machine context supplies the provider VM ID; daemon summaries and registry UUIDs are not used as VM IDs. Recovery restarts that chat's agent through the VM's installed CLI before retrying its failed prompt, and never sends the old prompt to a different chat after navigation. A failed or deferred restart leaves the prompt unsent and explains the next step. Provider login opens on this Mac, including when every open workspace is remote. The retry keeps the original click’s single-use ticket, bound to its session and prompt; it retains its expiry and cannot authorize another send.

"Claude failed to authenticate"
"Claude code is not set up in… steal credentials"
"Always need new claude credentials, that kind of suck"

Claude uses claude setup-token; Codex currently requires a fresh device login for each VM. The confirmation shows which provider, account, and VM receive credentials. Codex refresh credentials are never reused across VMs.

Official operational rule: “Use one auth.json per runner or per serialized workflow stream. Do not share the same file across concurrent jobs or multiple machines.” Codex CI/CD authentication.

Base: feat-cmux-next at 86ebb89edfcff8d398b0e44a91cbf06c277d5de5; credential transfer dependency #26139 is landed. The focused card suite passes on base (17 tests) and the repaired implementation (20 tests). Full type checking and lint pass with zero warnings or errors (focused run 40510618509). Full web check 40512041340 stops at the unchanged gallery font-size violation in SendScrollSetting.gallery.tsx:71, also reproduced on base in 40501809958. The focused checks run independently so this base failure does not hide the changed surface’s tests, type checking, or lint. The website shard also fails two generated CLI/settings documentation freshness assertions. Run 40518390276 executes the original web/tests/next-docs.test.ts against files archived from base f04356fe79a59de967ca1e4867ad96de8a7b76f0 and reproduces both failures (3 pass, 2 fail); all of that test’s inputs are unchanged by this PR. Native stack step 600a3db4af70c93d3965e4da passed the full package compile and four focused suites at earlier head 843112fa3591dc6139854a94c4bbae47c13fedcc. Current head additionally localizes the recovery confirmation and advertises availability in the gallery fixtures; the focused native verification is included in the final combined stack run.

The existing glass error card remains the selected presentation; gallery variants cover missing, expired, and rejected Cloud credentials. Before/after capture is attached below. Capture route: agent-pane.turn-error-card/cloud-missing, cloud-expired, and cloud-rejected at the exact head. Design references: cmux-design-references/apps/claude/live/first-run-sign-in.png and code-home-after-login.png.

Risk: recovery changes provider credentials for the owner VM and restarts the selected agent. Confirmation is mandatory and automation cannot approve it; team/shared images fail closed. App-server machines retain their error context but do not offer this legacy-backend transfer action. The restart targets one session, has a five-minute request deadline, and never restarts the daemon. The retry ticket expires after ten minutes; an expired ticket uses the existing unsent-prompt Retry action for a fresh click. Refused recovery or changed native context removes its reserved ticket. Older VM layouts without the installed work-user CLI require updating the machine before recovery can restart the chat.

Gallery: agent-pane.turn-error-card/agent-closed, agent-pane.turn-error-card/cloud-missing, agent-pane.turn-error-card/cloud-expired, agent-pane.turn-error-card/cloud-rejected

Agent session: agent session
Auth card replacement evidence for PR #26148.

Source: exact head 0aea78beb29419b5d8aee68ac922d25e353a9b70; gallery-advisory run 40544574436, artifact gallery-advisory-26148-0aea78beb29419b5d8aee68ac922d25e353a9b70. Renderer: Chromium gallery render with fallback fonts; not native macOS font evidence.

Before (generic existing card) After: missing cloud credential After: expired cloud credential After: provider rejected
before missing expired rejected

Dark captures: before, missing, expired, rejected.

The three cloud variants now visibly include the one-click Setup Claude Code credentials action. Cloud variants have no base image because these states did not exist on the base. All replacement PNGs passed normal pr-media checks and returned HTTP 200.

Agent session: agent session

@blacksmith-sh

This comment has been minimized.

@cmux-bot

cmux-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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

Review cad0380: 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=pr26148 -f ref=cloud-setup-auth-error -f platform=macos -f backend_mode=local

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards. This PR merged before its CI finished: fix forward on main.

CI failed on d97501dc17 (run 40568422921 attempt 1): 5 code, 1 unknown.
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped.

Job Verdict Why
web / Web tests (3/4) code a web test failed
web / react-apps-base-check (2) code a web test failed
web / react-apps-base-check (4) code a web test failed
web / react-apps-base-check (1) code a web test failed
web / react-apps-base-check (3) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs next-docs.test.ts cmux-next docs > the CLI and MCP reference is fresh against the action catalog: failed (job)
  • seen on other PRs next-docs.test.ts cmux-next docs > the settings reference is fresh against the settings schema: failed (job)
  • seen on other PRs agent-pane-background-tasks.test.ts the summary card lists the chat's background tasks: running ones first, the finished folded: failed (job)
  • seen on other PRs agent-pane-chat-unavailable.test.ts loading never shows the unavailable text: a slow attach, then a machine still connecting: failed (job)
  • seen on other PRs agent-pane-chat-unavailable.test.ts a chat whose machine goes offline names it, says when it was last seen, and Reconnect opens it: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts composer at 1x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts newtab at 1x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts composer at 2x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts newtab at 2x: focus is the resting hairline a step brighter, no ring: failed (job)
  • seen on other PRs agent-pane-hairline-focus.test.ts under Increase Contrast a focused edge keeps the resting edge, never a dimmer one: failed (job)
  • ... 24 more in the job logs

A web test can import code this PR changes without being one of its files: python3 scripts/ci/web_test_verdict.py --pr 26148 --file web/tests/next-docs.test.ts checks its import graph (on Linux, in a sandbox) and its failures on other branches.

Matched log lines
web / Web tests (3/4): (fail) cmux-next docs > the CLI and MCP reference is fresh against the action catalog [4.50ms]
web / react-apps-base-check (2): (fail) the summary card lists the chat's background tasks: running ones first, the finished folded [964.41ms]
web / react-apps-base-check (4): (fail) only page.css imports the page's sheets [25.34ms]
web / react-apps-base-check (1): (fail) every block in the chat column starts on the column's left edge [12616.90ms]
web / react-apps-base-check (3): (fail) no orange or system accent and no opaque glass on the gallery stages [677737.95ms]

Not re-run automatically: web / Web tests (3/4), web / react-apps-base-check (2), web / react-apps-base-check (4), web / react-apps-base-check (1), web / react-apps-base-check (3) are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; NEW: green on the base b2c0b43; do not merge until green; see lane-rules
red: web / Web tests (3/4); no finished base run on b2c0b43 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (1); no finished base run on b2c0b43 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (2); no finished base run on b2c0b43 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (3); no finished base run on b2c0b43 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (4); no finished base run on b2c0b43 to compare; do not merge until green; see lane-rules
red: web / react-apps-check; no finished base run on b2c0b43 to compare; do not merge until green; see lane-rules

CI fast guards failed on 7319d62c33 (https://github.com/manaflow-ai/cmux/actions/runs/40505030959). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally.

Stale: these images are of c865cd1; the head is now cad0380 and a new capture is running.

Gallery before/after for c865cd1: 4 states rendered, 6 images differ (picked by the Gallery: line in the PR body). Images are in the run's artifact, not on this public PR.

gh run download 40548267951 -R manaflow-ai/cmux -n gallery-advisory-26148-c865cd1564bc9eea827ade53d39c7b9e0fb00e7f (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.turn-error-card/agent-closed Apple System Colors Light unchanged 0% pr-body
agent-pane.turn-error-card/agent-closed Apple System Colors unchanged 0% pr-body
agent-pane.turn-error-card/cloud-missing Apple System Colors Light new 0% pr-body
agent-pane.turn-error-card/cloud-missing Apple System Colors new 0% pr-body
agent-pane.turn-error-card/cloud-expired Apple System Colors Light new 0% pr-body
agent-pane.turn-error-card/cloud-expired Apple System Colors new 0% pr-body
agent-pane.turn-error-card/cloud-rejected Apple System Colors Light new 0% pr-body
agent-pane.turn-error-card/cloud-rejected Apple System Colors new 0% pr-body

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo
teamleaderleo force-pushed the cloud-setup-auth-error branch from 27819aa to d857270 Compare October 27, 2026 12:31
@teamleaderleo
teamleaderleo force-pushed the cloud-setup-credentials-transfer branch from 0a0039a to 59f67d4 Compare October 27, 2026 12:57
@teamleaderleo
teamleaderleo force-pushed the cloud-setup-auth-error branch from 7319d62 to 940a400 Compare October 27, 2026 13:28
@teamleaderleo
teamleaderleo force-pushed the cloud-setup-auth-error branch from 940a400 to f1db1f3 Compare October 27, 2026 13:36
@teamleaderleo
teamleaderleo force-pushed the cloud-setup-auth-error branch from f1db1f3 to a18af07 Compare October 27, 2026 13:50
@teamleaderleo
teamleaderleo force-pushed the cloud-setup-auth-error branch from a18af07 to 90569ab Compare October 27, 2026 14:06
Base automatically changed from cloud-setup-credentials-transfer to feat-cmux-next October 27, 2026 14:17
@github-actions github-actions Bot added the risk:high Risk tier (docs/ci/risk-tiers.md) label Oct 27, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-lfi54i created for this PR by the cmux coordinator.

@cursor

cursor Bot commented Oct 27, 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.

Agent-Session: cloud-setup-auth-availability
Agent-Session: cloud-setup-auth-availability
@teamleaderleo
teamleaderleo merged commit 555f781 into feat-cmux-next Oct 27, 2026
51 of 87 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-setup-auth-error branch October 27, 2026 19:39
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This branch was successfully deployed

No deployments
ci-routing-agent — d97501dc Deployed Oct 27, 2026 by teamleaderleo via wait for same-key tree publisher #66669
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push risk:high Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant