Skip to content

fix(acpmux, agent pane): Ctrl-B works in the cmux model router's chats; acpmux says which chats it moves - #23211

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
bg-ctrl-b-router
Oct 21, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
bg-ctrl-b-router

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Ctrl-B now works in chats from the cmux model-router profile. Before, the pane decided which chats get Ctrl-B from the harness's name (claude or claude-*), but acpmux accepts _acpmux/process/background for any Claude Code (claude-stdio) harness. Two things went wrong:

  • The router profile runs Claude Code under the name cmux, so it got no Ctrl-B.
  • An ACP agent that a user's config named claude-* showed the hint, and acpmux then refused the request.

What changed

  • acpmux: every session summary now has backgroundsWork. acpmux computes it with the same check process/background uses (backgrounds_work in hub/processes.rs: the profile's kind is claude-stdio). So the summary and the request always agree.
  • The spec (spec/acpmux-protocol.json) and the generated types.ts are regenerated. docs/background-processes.md now says clients offer Ctrl-B from this field, not from the name.
  • Pane: backgroundsWork() reads the summary's field, plus the existing no-peer and not-Cloud checks. If the summary doesn't have the field (an older acpmux), the chat gets no Ctrl-B. For another harness, a peer's chat, or a Cloud chat, the hint stays hidden and Ctrl-B stays the composer's, as before.
  • Gallery: agent-pane.background-hint gains a router variant (hint shown) and a claudeAcp variant (no hint). The shared chat() fixture sets the field for Claude chats, so other gallery entries don't change.

Why a summary field: steering already works this way (a capability the session summary reports, which clients read). It also lets the client stop guessing harness names. The other option, initialize's operations list, applies to the whole connection, not to one chat.

Changelog

Fixed: Ctrl-B moves running work to the background in chats from the cmux model router, and the Ctrl-B hint no longer shows in ACP chats that only have a Claude-like name.

Tests: red on the base, green on the head

The tests are committed alone first (7633166), and the fix follows (88f6549). Everything ran on cmux16.

  • cargo test -p acpmux --test hub_integration a_chats_summary_says_whether_ctrl_b_moves_its_work
    • Base + tests: FAILED. backgroundsWork is Null where false is expected.
    • Head: ok.
  • bun test test/run-in-background.test.ts
    • Base + tests: 2 fail. The cmux chat got false, and the claude-acp chat got true.
    • Head: pass.
  • CMUX_BROWSER_TESTS=1 bun test test/agent-pane-ctrl-b-background.test.ts
    • Base + tests: 2 fail. "the model router's chat … shows the hint and moves its work" and "an ACP agent named claude-acp shows no hint and keeps Ctrl-B".
    • Head: all pass.

Observed / Not run

Observed on cmux16 at the head (1bc4ff0, after merging feat-cmux-next at 1369f27):

  • Rust:
    • all 38 processes hub tests pass (the new one, Ctrl-B, the Codex processes)
    • protocol_ir_is_current passes
    • cargo fmt --check is clean
    • clippy -p acpmux --all-targets (run before the merge) reports only three warnings, all outside this change and all on the base: sort_by_key in cmux-worktree-care, cmp_owned in steer_now_tests, and double_ended_iterator_last in tests/prompt_images.rs
  • Webviews:
    • vp check finds no warnings, lint errors or type errors
    • the other check scripts pass, and acpmux-protocol:check reports the generated code is current
    • bun run check stops at check:switch-fetches, which is red on 1369f27 too (composer/keptAttachments.ts:134)
    • the run-in-background unit tests pass. ui-rules fails on CopyButton.tsx:43-44, which is red on 1369f27 too
    • the browser Ctrl-B test passes (12 tests), including the base's new notice tests

Before the merge, on 3020a01 plus this change, bun run check showed 0 errors. Its two warnings are in HistoryPage.tsx and test/sidebar-rail-css.test.tsx, neither touched here.

Four acpmux tests fail the same way on 3020a01 with and without this change, so they are base reds:

  • lib: protocol_registry_names_every_served_method
  • lib: care_a_stopped_daemon_s_sessions_are_use_not_open
  • hub_integration: session_offers::an_offered_chat_is_a_chip_only_…
  • hub_integration: transfer_guard::a_chat_with_no_asking_mode_moves_…

Not run:

  • the full acpmux suite on Linux or Windows (CI covers those)
  • a live router chat in a tagged build

No capture: this is a webview-only change. The browser test and the agent-pane.background-hint gallery variants cover it.

🤖 Generated with Claude Code
Agent session: cosmic-gray


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


Summary by cubic

Fixes Ctrl-B in chats from the cmux model router profile. The pane previously decided which chats offer Ctrl-B from the harness name (claude or claude-*), but acpmux accepts background requests for any Claude Code (claude-stdio) harness. So the cmux router profile got no Ctrl-B, while an ACP agent named claude-* showed the hint and got refused.

Every session summary now reports backgroundsWork, computed with the same check that _acpmux/process/background uses. The pane reads this field instead of guessing from the harness name.

  • Across both cmux and the agent pane, a chat's backgroundsWork comes from the summary, so the hint and the request always agree.
  • An acpmux that does not report the field (older version) gets no Ctrl-B.
  • Tests cover the cmux router chat (hint shown, work moves) and an ACP agent named claude-acp (no hint, Ctrl-B refused).

Written for commit 1bc4ff0. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 3 commits October 20, 2026 23:54
…do, not the harness's name

The cmux model router's profile is Claude Code under acpmux, named `cmux`, and
gets no Ctrl-B; an ACP agent a user named `claude-acp` gets the hint and is
refused. These tests want each chat's summary to say `backgroundsWork` and the
pane to read it. They fail on the base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-6db9-7611-bb2a-f87286aa9ae6&host=cosmic-gray
…mux says which chats it moves

The pane offered Ctrl-B by harness name (`claude`, `claude-*`), while acpmux
takes `_acpmux/process/background` for any Claude Code (claude-stdio)
harness. So the model router's `cmux` profile, Claude Code under another
name, got no Ctrl-B, and an ACP agent named `claude-*` got a hint acpmux
refuses.

Every session summary now says `backgroundsWork`, from the same predicate
`process/background` checks (`hub/processes.rs` `backgrounds_work`). The
pane's `backgroundsWork` reads it, plus the existing no-peer and not-Cloud
checks; an acpmux that does not say gets no Ctrl-B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-6db9-7611-bb2a-f87286aa9ae6&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 21, 2026 08:39 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

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

Review 1bc4ff0: 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=pr23211 -f ref=bg-ctrl-b-router -f platform=macos -f backend_mode=local

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by chat-background on cosmic-gray · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo
teamleaderleo merged commit e766283 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the bg-ctrl-b-router branch October 21, 2026 08:49
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
Merged feat-cmux-next (#23211 added backgroundsWork to SessionSummary);
SessionDetail flattens it, so the IR and the web types carry it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-663f-7650-b9f7-64d198c6b88b&host=cosmic-gray
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…ebab case (#23277)

gallery-coverage requires lower-kebab-case variant names; the claudeAcp
variant from #23211 reddened "the entries are valid" on feat-cmux-next.


Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-6db9-7611-bb2a-f87286aa9ae6&host=cosmic-gray

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
… and _acpmux/event (#20894)

* acpmux protocol: type attach, events, detach, view, markUnread, watch and _acpmux/event

PR2 of the typed acpmux protocol (PR1 #20576). The registry types the
session-log methods and the `_acpmux/event` notification
(protocol/events.rs): AttachParams/AttachResult with SessionDetail (the
summary plus what an attached client draws), EventsParams/EventsResult,
SessionRef, ViewParams, WatchParams and SessionEvent. `server::event_value`
builds its record from SessionEvent, so the wire shape has one source.

`_acpmux/sessions` and `_acpmux/watch` page with limit and cursor since PR1
landed; SessionsParams and SessionsResult now say so (nextCursor).

Also registers harness/update and sessions/restart_harness, which base
serves now. The web client sends these methods through a typed helper,
and the pane's EventRecord derives from the generated SessionEvent.

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

* acpmux protocol: SessionDetail carries every SessionSummary field again

SessionDetail flattens SessionSummary, but the committed IR still had the
summary of Oct 14: base has since added children, depth, lifecycleReceipt,
mcpServers, pullRequests, shortName, spawnedBy and startedBy. The IR's
SessionDetail is now the current summary plus its own fields, and the web
types are regenerated. direct.ts imports the generated types once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-663f-7650-b9f7-64d198c6b88b&host=cosmic-gray

* acpmux protocol: SessionDetail takes base's backgroundsWork

Merged feat-cmux-next (#23211 added backgroundsWork to SessionSummary);
SessionDetail flattens it, so the IR and the web types carry it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-663f-7650-b9f7-64d198c6b88b&host=cosmic-gray

* tests: drop the registry line a local hook added in the base merge

tests/test_media_auto_tour.py is base's (unregistered there); registering it
belongs to the base, not to this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-663f-7650-b9f7-64d198c6b88b&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

This branch was previously deployed

3 inactive deployments
artifacts — 1bc4ff07 Deployed Oct 21, 2026 by teamleaderleo
sentry-dsyms — 1bc4ff07 Deployed Oct 21, 2026 by teamleaderleo
cmux-tui-merge-tree — 1bc4ff07 Deployed Oct 21, 2026 by teamleaderleo
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