Skip to content

cmux NEXT Cloud: the agent's chat links to the Cloud session it started - #25625

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
25597-acp-chat-new-vm
Oct 27, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
25597-acp-chat-new-vm

Conversation

@austinywang

@austinywang austinywang commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #25597

What changes

cmux cloud start-session (#25319, #25414) already lets an ACP agent in a chat ask to start a session on a new or existing Cloud machine. The person clicks Start on the card in the agent's chat. The machine is created or resumed, it appears in the sidebar under its own machine section, and a chat on that machine starts the agent. What was missing was the third part of the acceptance, the chat links to it. On success the card just disappeared, and nothing in the asking chat pointed to where the work went.

Now, once the session runs, the card in the asking chat turns into a done card:

claude runs on Cloud machine dev. Its chat is in that machine's workspace in the sidebar. [Open Chat] [Dismiss]

  • Open Chat shows the new chat on the machine through AppServices.revealTab, the same way Go To and cmux:// links jump to a tab. Nothing is shown until the person clicks, so the agent's run never moves focus (revealing: false is unchanged).
  • If no connected machine lists the new chat any more (its tab was closed, or the machine is disconnected), Open Chat says so in a failed card with Dismiss.
  • The done card belongs to the ask that started the run. A later ask in the same chat takes the card over, and the old card's buttons then do nothing. A sign-out or team switch (endAll) removes done cards, because their Open Chat would show a chat from the account that ended.
  • Tool cards have a new done state in AgentPaneToolCard.State and in the page store (toolCardStore.ts). The page draws it like the other states, with the host's text and buttons. A gallery variant agent-pane.tool-cards/started shows it.
  • Three new strings in CloudSessions.xcstrings (openChat, started, chatGone), in all 21 languages: en and ja are translated, the others needs_review, as the table's existing keys are.
  • What's New highlight: release-notes/next/highlights/cloud-start-session-chat-link.md.

Defaults I picked

  • The link is a button on the existing tool card, not a new message in the transcript. The card is the place the person already answered, and it needs no acpmux or transcript schema change.
  • The done card stays until Open Chat, Dismiss, a new ask in that chat, or a sign-out. It is not persisted across relaunch. After a relaunch, the new chat is still in the machine's workspace in the sidebar.

Changelog

  • Added: After you start a Cloud session from an agent's chat, the chat's card links to the new chat on the Cloud machine (Open Chat).

Tests

  • CloudStartSessionAsksTests: a started run leaves a done card with Open Chat and Dismiss, and nothing is revealed before the click. Open Chat on a closed chat says it is gone. The link belongs to its ask, and a later ask takes the card. endAll removes a done card. The page receives the state as done.
  • webviews/.../toolCardStore.test.ts: the store keeps a done card and drops an unknown state.
  • Red/green: the tests commit (0a542c2) fails on the fleet because started(…) and .done don't exist yet. The head passes; results are below.

Observed / Not run

  • Ran: python3 scripts/cmux-next/prepush-gate.py (no new violations; an advisory app-size warning for +30 App lines in Cloud/, which is where this verb's code already lives). scripts/web-lint.sh (webviews bun run check) passed.
  • Fleet: on the head a771afb, CloudStartSessionAsksTests and CloudStartSessionTests passed (cmux-ci run --class light --script scripts/ci/package-test-lane.sh --arg=suite --arg=Packages/macOS/CmuxNext --arg=CloudStartSessionAsksTests,CloudStartSessionTests, step 2de45cd511265ac4e0a34689 on aws-m4pro-7). Red on the tests-only commit 0a542c2: fails as expected (step 3193b0739e5b27d32cc04e47 on aws-m4pro-7): value of type 'CloudStartSessionAsks' has no member 'started' and CloudStartSessionStrings has no started/chatGone.
  • Not run: an end-to-end Start against a real Cloud machine. That needs a signed-in Cloud account and creates a billed VM, so this is left for dogfood on the tagged build below.

Capture: No capture: the card is the existing agent tool card (AgentPaneToolCard) with a new done state. Its webview rendering is the gallery variant agent-pane.tool-cards/started, and the change has no native UI. Dev build: tag 25597-chat-links-cloud-session (fleet job d34ae5a9cca53fdedfb63c57).

Review: Review (claude review subagent): SHIP at a771afb. Findings and their fixes are in the PR comments.

🤖 Generated with Claude Code

austinywang and others added 3 commits October 26, 2026 13:30
… new chat (#25597)

Red before the fix: CloudStartSessionAsks has no started(tab:token:text:gone:reveal:), the card has no done state, and the page store drops a done card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hine (#25597)

After the person's Start, the agent's ask card no longer just disappears: it turns into a done card,
"claude runs on Cloud machine dev. Its chat is in that machine's workspace in the sidebar.", with
Open Chat (reveals the new chat tab, AppServices.revealTab) and Dismiss. Nothing is shown before the
person clicks, so no focus moves. A chat that's gone says so, with Dismiss. The card has a new done
state (AgentPaneToolCard.State, toolCardStore.ts) and a gallery variant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the ask's own card; highlight

Review fixes:
- endAll() removes done cards: their Open Chat would show a chat of the account that ended.
- The tests' card wait passes over a run's working and done cards, so a second ask in the same chat is waited for.
- The gallery's done card has the shipped text; a What's New highlight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@austinywang austinywang added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 26, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator

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

@austinywang

Copy link
Copy Markdown
Contributor Author

Review (correctness-first, review subagent), at 9b34d44

Verdict then: FIX. The production change was correct, but one new test could not pass. Fixed in a771afb.

Finding Resolution
Bug: In theLinkBelongsToItsAskAndALaterAskTakesTheCard, the second shownIn("chat-10") returned on an event already buffered from the working or done card, before the second ask had shown its card. The old Open Chat then went through, and the test failed after a 120 s wait. Cards now yields (tab, state), and shownIn waits for that tab's ask card, skipping any working or done card.
Minor: a done card survived a sign-out or team switch, so its Open Chat could show a chat from the account that ended. endAll() removes done cards. They are tracked in linked, and a new ask or a click clears that entry. Covered by the new test endAllRemovesADoneCard.
Minor: the gallery's done card text didn't match the shipped string. Fixed.
Minor: no What's New highlight. Added release-notes/next/highlights/cloud-start-session-chat-link.md.

The reviewer checked and found these correct: old cards can't overwrite a later ask's card (AgentToolCards.set replaces each owner's handler for its tab, and the open[tab] == nil guard backs that up); token handling; no retain cycles; tab_id is the id revealTab resolves through locateTab; the new done state breaks no other card consumer (no exhaustive switches, no data-state CSS); all 21 localizations use the right positional specifiers; the gallery entry is valid.

My own check at a771afb: I reread the diff and the endAll and linked bookkeeping. The fleet suites CloudStartSessionAsksTests and CloudStartSessionTests passed (step 2de45cd511265ac4e0a34689 on aws-m4pro-7). The pre-push gate and web lint pass.

@austinywang

Copy link
Copy Markdown
Contributor Author

Review (claude review subagent): SHIP at a771afb. The re-review of the fix commit found the test race fixed and the linked bookkeeping consistent in every path (started, click, new ask, a failed ask with no page, endAll), and raised no new findings.

@blacksmith-sh

blacksmith-sh Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Found 119 test failures on Blacksmith runners:

Failures

Test View Logs
test/accent-glass-invariants.test.ts/accent-glass-invariants.test View Logs
test/accent-glass-invariants.test.ts/accent-glass-invariants.test View Logs
test/agent-pane-agents-pill.test.ts/agent-pane-agents-pill.test View Logs
test/agent-pane-agents-pill.test.ts/agent-pane-agents-pill.test View Logs
test/agent-pane-background-tasks.test.ts/agent-pane-background-tasks.test View Logs
test/agent-pane-background-tasks.test.ts/agent-pane-background-tasks.test View Logs
test/agent-pane-bottom-stack.test.ts/agent-pane-bottom-stack.test View Logs
test/agent-pane-bottom-stack.test.ts/agent-pane-bottom-stack.test View Logs
test/agent-pane-hairline-focus.test.ts/agent-pane-hairline-focus.test View Logs
test/agent-pane-hairline-focus.test.ts/agent-pane-hairline-focus.test View Logs

...and 109 more test failures. View all on Blacksmith: run 40408682419, run 40408682118

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

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards.

CI failed on 21f629143c (run 40408682419 attempt 1): 4 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (2) code a web test failed
web / react-apps-base-check (3) 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-check unknown no known signature; failed step: Check webview test shards

Failures:

  • 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-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)
  • seen on other PRs agent-pane-hairline-focus.test.ts keyboard focus changes what a solid Send, Stop, the prompt editor's Send and a plain button paint; s...: failed (job)
  • seen on other PRs agent-pane-no-capsules.test.ts agent pane page > rounds its controls as small-radius rects, not capsules: failed (job)
  • seen on other PRs agent-pane-peer-chat.test.ts a chat on an SSH machine > counts its running turn from the prompt and offers no machine switch mid-...: failed (job)
  • seen on other PRs agent-pane-question-records.test.ts answered live, the card goes and the record takes its place: failed (job)
  • ... 22 more in the job logs
Matched log lines
web / react-apps-base-check (2): (fail) the summary card lists the chat's background tasks: running ones first, the finished folded [959.11ms]
web / react-apps-base-check (3): (fail) a chat on an SSH machine > counts its running turn from the prompt and offers no machine switch mid-chat [30991.18ms]
web / react-apps-base-check (4): (fail) no orange or system accent and no opaque glass on 2210 gallery stages [561681.20ms]
web / react-apps-base-check (1): (fail) 0 .mov 300 MB menu remote [14557.81ms]

Not re-run automatically: web / react-apps-base-check (2), web / react-apps-base-check (3), web / react-apps-base-check (4), web / react-apps-base-check (1), web / react-apps-check 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; base red: the same failure on the base 0a167e2; does not block
red: web / react-apps-base-check (2); no finished base run on 0a167e2 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (3); no finished base run on 0a167e2 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (4); no finished base run on 0a167e2 to compare; do not merge until green; see lane-rules
red: web / react-apps-check; base red: the same failure on the base 0a167e2; does not block

@austinywang austinywang added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 26, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (Codex gpt-6-astra xhigh): SHIP at 21f6291. No findings; landing it once its reds check out as base's.

@teamleaderleo
teamleaderleo merged commit 3ed8018 into feat-cmux-next Oct 27, 2026
141 of 162 checks passed
@teamleaderleo
teamleaderleo deleted the 25597-acp-chat-new-vm branch October 27, 2026 00:15
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

austinywang added a commit that referenced this pull request Oct 29, 2026
…-notary red on base)

test_the_repository_highlights_validate fails on every feat-cmux-next PR: the
highlight from #25625 has no tryIt action or docs link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmux-bot Bot pushed a commit that referenced this pull request Oct 30, 2026
* docs(next): the Cloud start-session highlight links its docs (release-notary red on base)

test_the_repository_highlights_validate fails on every feat-cmux-next PR: the
highlight from #25625 has no tryIt action or docs link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(nightly): read the legacy publish job with its moved step scripts inline

#25879 moved "Generate the old feed's
appcast" into scripts/ci/nightly-steps/legacy-identity-appcast.sh, so
test_the_appcast_comes_from_the_tested_plist no longer found its commands in
nightly.yml (ValueError: substring not found) and release-notary went red on
feat-cmux-next. Read the workflow through nightly_workflow_text.nightly_text(),
as the other nightly workflow tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(nightly): leave test-execution.toml as on the base

The pre-commit hook registered two base tests that this PR does not touch;
keep this PR to the two red fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* release notes: two new fixed highlights get their Try it action (base red)

home-composer-border (#26119) and selected-harness-start (#26106) landed with
neither an action nor a docs link, which scripts/whats-new/validate.py requires,
so release-notary's test_the_repository_highlights_validate is red on
feat-cmux-next. The Chief field one opens Home; the harness one starts a new
agent chat.

Test: python3 scripts/whats-new/test_digest.py: 1 failure before, OK after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* nightly: the Sparkle key test reads nightly.yml with its moved steps inline (base red)

#26196 and #26210 moved two of the four SPARKLE_PRIVATE_KEY="$(./scripts/ci/nightly-sparkle-key.sh)"
call sites into scripts/ci/nightly-steps/, so the raw workflow has two and
tests/test_nightly_sparkle_key.sh (release-notary) fails its at-least-three check.
It now greps nightly_workflow_text.nightly_text(), the expansion the other
workflow tests read.

Test: bash tests/test_nightly_sparkle_key.sh: FAIL on the base, PASS here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cmux-next routing: a test's home-folder Claude settings path is not a repository read (base red)

CloudCredentialTransferTests named ".claude/settings.json" under a temp home
in one literal; ci-target-graph.py found the repository's own file at that
path and listed it as a CmuxNextAppTests read (base autofix c14a002), which
cmux-next.yml's pull_request paths do not cover, so Tier routing's
test_every_routed_input_triggers_the_workflow is red on feat-cmux-next. The
test builds the path from folder and file, and the graph loses the read
(literal_reads recomputed: the target's other 14 reads are unchanged).

Test: python3 tests/test_cmux_next_route.py: 1 failure on the base, OK here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* acpmux: the upload-link test names no literal ~/.acpmux state root (base red)

Same change as #26087, combined here because each is red on the other's red:
check-state-roots counts the inline test module's /home/me/.acpmux/... fixture
(since #25840). upload_ids reads only the parent folder, so the test is the same.

Test: bash scripts/cmux-next/check-state-roots.sh .: exit 1 on the base, ok here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* acpmux: collapse the Codex broker's account checks into let chains (clippy base red)

#26191 nested two if-lets in codex_auth_broker.rs; clippy -D warnings
(collapsible_if) fails on it for every PR that touches acpmux. Same checks,
one let chain each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* release notes: the compact thought-row highlight gets its Try it action (base red)

#26270 added it with neither an action nor a docs link, so release-notary's
test_the_repository_highlights_validate is red again.

Test: python3 scripts/whats-new/test_digest.py: 1 failure before, OK after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tests: leave test-execution.toml as the base has it

The pre-commit hook registered unrelated tests while committing the base merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cmux-next tests: drop the settings-path split; the graph skips .claude paths itself

#26248 made ci-target-graph.py ignore .git, .claude and .codex paths a test
names, so the one-literal form no longer routes CmuxNextAppTests on the
repository's settings file. Back to the base's line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(next): the Cloud start-session highlight links its docs (release-notary red on base)

test_the_repository_highlights_validate fails on every feat-cmux-next PR: the
highlight from #25625 has no tryIt action or docs link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(next): give the two base highlights release-notary rejects a live action

feat-cmux-next's inline-pr-pills and inspector-error-colours highlights have
no action or docs line, so scripts/whats-new/test_digest.py
(release-notary) fails on the base. Use existing palette actions rather than
https://cmux.com/docs/agents, which returns 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(next): give the new Find in Chat highlight a live action (release-notary red on base since 93ff53c)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

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

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 21f62914 Deployed Oct 26, 2026 by teamleaderleo via namespace autofix #3683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants