Skip to content

cmux NEXT agent pane: new subagents stay in the chat unless panes are turned on - #22615

Merged
austinywang merged 10 commits into
feat-cmux-nextfrom
feat-cmux-next-subagent-panes-off
Oct 21, 2026
Merged

austinywang merged 10 commits into
feat-cmux-nextfrom
feat-cmux-next-subagent-panes-off

Conversation

@austinywang

@austinywang austinywang commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A chat pane opened a new split for every subagent its chat started. Agent work routinely starts several subagents (reviews, searches, dispatch), so the splits piled up to the right of the chat. The summary card's "Open new subagents in panes" switch could turn that off, but agent panes use non-persistent web storage (AgentPaneView.sharedDataStore is WKWebsiteDataStore.nonPersistent()), so the choice was gone after every restart.

This makes the switch off by default (subagents/subagentPanes.ts): new subagents stay in the chat, and the pane opens only once the user turns the switch on (stored as "on"; an old "off" value still reads as off). Clicking a subagent row or a summary card row still opens its pane, as before. The server snapshot uses the same read, so it no longer reports "on".

Making the choice survive restarts (a cmux.json setting) is a separate follow-up. With off as the default, a restart no longer brings the splits back.

Testing

Focused command (from webviews/): bun test test/subagent-panes-default-off.test.ts

  • Base (0dba7a6f35f7d, test only): 1 pass, 2 fail. With nothing stored, the hook reported on (Expected: "<span>off</span>", Received: "<span>on</span>").
  • Head: 3 pass, 0 fail.

Observed / Not run

  • Observed: the focused test above, red on base and green on head. scripts/web-lint.sh passed (webviews).
  • Not run: the full webviews suite and the gallery (left to PR CI). No tagged-app dogfood. The gallery's pane-open / card-open-pane cases cover the click path, which this change doesn't touch.

Changelog

  • Changed: Subagents no longer open a split each by default. Click one to open it beside the chat, or turn on "Open new subagents in panes" in the chat's summary card.

🤖 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

Makes the "Open new subagents in panes" switch off by default, so new subagents stay in the chat instead of opening a split each.

Agent panes use non-persistent storage, so the manual off setting was lost after every restart and the splits came back. The switch now reads as off until the user turns it on (stored as "on"); an old "off" value still reads as off, and clicking a subagent row or summary card row still opens its pane. The server snapshot uses the same read, so it no longer reports "on." The release notes entry gains a "Try it" action to satisfy the highlights validator.

Written for commit 733a537. Summary will update on new commits.

View guided diff Turn on auto-fix

austinywang and others added 2 commits October 20, 2026 14:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent work starts many subagents, and a split for each crowded the
workspace. Agent panes keep their storage only until the app quits, so
turning the switch off lasted one launch. Off is now the default; a click
on a subagent still opens its pane.

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

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

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 733a537: 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=pr22615 -f ref=feat-cmux-next-subagent-panes-off -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 733a53710a (run 39545103014 attempt 1): 4 code, 1 unknown.

Job Verdict Why
web / react-apps-check (3) code a web test failed
web / react-apps-check (1) code a web test failed
web / react-apps-check (4) code a web test failed
web / react-apps-check (2) 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-trust-ask-corner.test.ts the trust bar's corner is the composer card's: failed (job)
  • seen on other PRs agent-pane-trust-ask-corner.test.ts no caption stands between the open trust question and the card: failed (job)
  • seen on other PRs composer-mention.test.ts @ then letters lists the chat's matching files and Return writes the path: failed (job)
  • seen on other PRs composer-mention.test.ts after picking a path markdown escapes, typing on leaves the picker closed: failed (job)
  • seen on other PRs composer-mention.test.ts @proje lists other chats, then folders, then the chat folder's files: failed (job)
  • seen on other PRs composer-mention.test.ts a chat named for a long prompt does not take @app from the file: failed (job)
  • seen on other PRs composer-mention.test.ts a bare @ lists the most recent other chats: failed (job)
  • seen on other PRs composer-mention.test.ts an @ inside a word opens nothing and asks the host for nothing: failed (job)
  • seen on other PRs agent-pane-soft-edges.test.ts the transcript fades under the header once scrolled, and above the composer while more lies below: failed (job)
  • seen on other PRs composer-history.test.ts ↑ and ↓ in an empty prompt step through the chat's earlier prompts: failed (job)
  • ... 17 more in the job logs
Matched log lines
web / react-apps-check (3): (fail) the trust bar's corner is the composer card's [6733.27ms]
web / react-apps-check (1): (fail) the transcript fades under the header once scrolled, and above the composer while more lies below [4088.75ms]
web / react-apps-check (4): (fail) queued and steering prompts > the queue takes its own place in the stack: nothing is cut off or drawn over [1286.72ms]
web / react-apps-check (2): (fail) the adopted turn's Worked for opens to its commands and edited files [31120.46ms]

Not re-run automatically: web / react-apps-check (3), web / react-apps-check (1), web / react-apps-check (4), web / react-apps-check (2), 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 4a15471; does not block
red: web / react-apps-check; base red: the same failure on the base 4a15471; does not block
red: web / react-apps-check (1); base red: the same failure on the base 4a15471; does not block
red: web / react-apps-check (2); base red: the same failure on the base 4a15471; does not block
red: web / react-apps-check (3); base red: the same failure on the base 4a15471; does not block
red: web / react-apps-check (4); NEW: Expected: <= 552 Received: 577 at <anonymous> (/home/runner/_work/cmux/cmux/webviews/test/agent-pane-queue-steer.test.ts:355:32) is not red on the base 4a15471; do not merge until green; see lane-rules

CI fast guards failed on 39fc93a5c1 (https://github.com/manaflow-ai/cmux/actions/runs/39534166871). 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.

Tour of 733a53710a (run): no media. The tour did not run: only webview code changed (2 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label to tour it on a Mac.

@blacksmith-sh

This comment has been minimized.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator

cmux-next guards / defaults-snapshot is red on 17 of 17 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@cursor

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

teamleaderleo and others added 2 commits October 20, 2026 18:48
The highlights validator needs a tryIt action or a docs link.

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

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

@austinywang

Copy link
Copy Markdown
Contributor Author

Review (head 0d1d4fc8e65a7f9917392ffa7aa361590b734ffb)

A correctness-first review subagent ran at be4130f and passed it (PASS). I checked the diff myself: it's still the same 3 files, and the only change since that review is a fix to the What's New file.

Findings and how each was resolved:

  1. Consumers: only App.tsx uses the hooks. Clicking a subagent row or a card row still opens its pane through showSubagent, and that path never checks the switch. No change needed.
  2. Gallery and tests: the pane-open and card-open-pane cases start from a click, and nothing depends on auto-open being on by default. No change needed.
  3. Server snapshot set to read: no page hydrates, and read catches storage errors. No change needed.
  4. Low: the test covers read but not the setter. Left as is; the setter is two lines.
  5. Low: the What's New entry failed release-notary, which needs a Try it action. Fixed in 0d1d4fc (action: palette.newAgentChat). scripts/whats-new/test_digest.py now passes locally: 5 tests OK.

Red checks at be4130f

Not run: the full webviews suite locally (CI ran it) and a tagged-app dogfood.

@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 21, 2026
@cursor

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

@austinywang austinywang added ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds and removed ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds labels Oct 21, 2026
@austinywang
austinywang merged commit 2134436 into feat-cmux-next Oct 21, 2026
@austinywang
austinywang deleted the feat-cmux-next-subagent-panes-off branch October 21, 2026 04:39
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants