Skip to content

Agent pane: a subagent's own pane shows it read only, without the chat's composer, queue or PR bars - #22986

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cmux/subagent-pane-own-state
Oct 21, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cmux/subagent-pane-own-state

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

A subagent's own pane now shows the subagent read only. It no longer draws the chat's composer, queued prompts, pull request bars or agents pill. Leo's screenshot (2026-10-20) showed a reviewer subagent's pane with the chat's queued "this is a bit spammy" and its #663 bar. That pane is a tab on the chat's own acpmux session, so the bottom of the page was the chat's: a prompt typed there went to the chat. The pane now ends in one line, "Read only · messages go to ".

The same screenshot showed the subagent opening a pane by itself. Base doesn't do that since #22615 (Austin, default off), which landed after the build Leo was likely running. Every other path that opens a subagent pane is a click. This PR adds a behavior test for that default: a subagent the chat starts opens no pane, and with the switch on it opens exactly one.

Changes

  • App.tsx: a pane opened on subagent:<id> (the app's reveal) sets ownSubagentPane, and the bottom stack renders SubagentPaneFooter instead of the composer stack. A chat pane that shows a subagent in place (a host that opens no panes) keeps its composer.
  • subagents/SubagentPaneFooter.tsx (new) and subagents/subagents.css: the read-only line.
  • Localizable.xcstrings: new subagents.paneReadOnly, in 21 locales.
  • No change to the queue rows (ComposerQueue.tsx, which prompt-queue-edit owns) or to the composer's send mode (which steer-default is changing).

Testing

  • test/subagent-pane-own-state.test.ts (browser lane, bun test from webviews/). The chat's pane keeps its composer, queue and PR bar. After the subagent:a1 reveal, the pane has no composer, no queued row and no PR bar, and shows the read-only line. Expected red at e480620 (test only) and green at the head. CI's browser lane is the first run.
  • test/subagent-panes-auto-open.test.tsx: the default-off hook on a subagent that starts while the chat shows. It passes on base too: base already behaves this way, and this pins it.

Observed / Not run

  • Observed: prepush-gate.py and the pre-push web lint passed.
  • Not run locally: the tests and the gallery (no test runs on Leo's Mac).
  • Follow-up, not in this PR: a "Message parent" action in the footer needs a native action that focuses the chat's own tab, which base doesn't have (chat.openTab refuses the pane's own session). A restored subagent tab also comes back as a full chat, because the subagent: reveal isn't saved with the tab.

Changelog

  • Fixed: A subagent's pane no longer shows the chat's composer, queued prompts or pull request bars.

Agent session: cosmic-gray

🤖 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

A subagent's own pane now shows the subagent read only, without the chat's composer, queued prompts, or pull request bars.

Previously, a pane opened on subagent:<id> was a tab on the chat's session, so it drew the chat's composer, queue, and PR dock — and a prompt typed there went to the chat. The pane now ends in a single line, "Read only · messages go to ".

The read-only state applies only while the pane shows a subagent: once it shows a chat ("Subagent of", a branch pill, or another harness), that chat's composer, queue, and PR bars come back. While a subagent is shown, the header's PR chip and the summary's Sources + stay off.

Changes

  • A pane revealed via subagent:<id> sets ownSubagentPane; the bottom stack renders SubagentPaneFooter instead of the composer stack while it shows a subagent. A chat pane showing a subagent in place keeps its composer.
  • The header's pull request chip (pullRequestChip) and the Sources + attach button are disabled in the pane's read-only state.
  • Adds subagents.paneReadOnly localization in 21 locales.
  • Adds browser tests covering the pane's read-only state, the return of the chat's composer via "Subagent of", and the default-off behavior where a subagent the chat starts opens no pane of its own.

Written for commit 08c03a5. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 20, 2026 22:24
…, queue or PR bars; new subagents open no pane

Red: a pane opened on subagent:<id> renders the chat's composer, its
queued prompt and its pull request bar (Leo, 2026-10-20). The auto-open
test covers the default-off hook on a subagent that starts while the
chat shows.

Agent-Session: 01a15ba9-9614-7832-8e39-d8ca0407c193
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s composer, queue or PR bars

A subagent pane is a tab on the chat's session, so it drew the chat's
composer: its queued prompt, its pull request bar, the agents pill, and a
prompt typed there went to the chat. A pane opened on subagent:<id> now
ends in one line naming the chat that takes messages.

Agent-Session: 01a15ba9-9614-7832-8e39-d8ca0407c193
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

owner: 01a15ba9-95eb-79d2-bdfd-103d2b903ed9 on cosmic-gray

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 08c03a5: 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=pr22986 -f ref=cmux/subagent-pane-own-state -f platform=macos -f backend_mode=local

Probably yours: agent-pane-ctrl-b-background.test.ts, agent-pane-ctrl-b-background.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): agent-pane-wheel-pass-through.test.ts, agent-pane-wheel-pass-through.test.ts, chip-fixed-width.test.ts and 19 more.

CI failed on 08c03a59e2 (run 39557164933 attempt 1): 4 code, 1 unknown.

Job Verdict Why
web / react-apps-check (4) code a web test failed
web / react-apps-check (3) code a web test failed
web / react-apps-check (1) 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-wheel-pass-through.test.ts chromium > the wheel over a long draft stops at its ends and moves nothing else: failed (job)
  • seen on other PRs agent-pane-wheel-pass-through.test.ts webkit > the wheel over a long draft stops at its ends and moves nothing else: failed (job)
  • seen on other PRs chip-fixed-width.test.ts no ellipsized chip, tab or card in the agent pane truncates at a fixed width: failed (job)
  • seen on other PRs composer-location-strip.test.ts the chat composer at 420 px: the strip's marks line up with the prompt's edges: failed (job)
  • seen on other PRs agent-pane-column-edges.test.ts the strip or queue and the card meet square in one rim, and the queue keeps room above: 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 composer-history.test.ts ↑ and ↓ in an empty prompt step through the chat's earlier prompts: failed (job)
  • seen on other PRs diff-toolbar-narrow.test.ts at 460 px the base picker's label stays in its chip, clear of jump-to-file: failed (job)
  • new in this PR agent-pane-ctrl-b-background.test.ts with no running call, Ctrl-B stays the composer's and asks nothing: failed (job)
  • new in this PR agent-pane-ctrl-b-background.test.ts a Codex chat shows no hint and keeps Ctrl-B: failed (job)
  • ... 14 more in the job logs
Matched log lines
web / react-apps-check (4): (fail) chromium > the wheel over a long draft stops at its ends and moves nothing else [4087.53ms]
web / react-apps-check (3): (fail) the strip or queue and the card meet square in one rim, and the queue keeps room above [6117.06ms]
web / react-apps-check (1): (fail) with no running call, Ctrl-B stays the composer's and asks nothing [1125.15ms]
web / react-apps-check (2): (fail) queued and steering prompts > the queue takes its own place in the stack: nothing is cut off or drawn over [1324.54ms]

Not re-run automatically: web / react-apps-check (4), web / react-apps-check (3), web / react-apps-check (1), 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 6143f81; does not block
red: web / react-apps-check; base red: the same failure on the base 6143f81; does not block
red: web / react-apps-check (1); NEW: - [] + [ + "type "mail me@rea": layout shift 0.0002 (limit 0)", + ] - Expected - 1 + Received + 3 at <anonymous> (/home/runner/_work/cmux/cmux/webviews/test/com (+8 more) is not red on the base 6143f81; do not merge until green; see lane-rules
red: web / react-apps-check (2); NEW: Expected: "Do anything" Received: "Type / for commands" at <anonymous> (/home/runner/_work/cmux/cmux/webviews/test/composer-suggested-prompt.test.tsx:206:19) (+7 more) is not red on the base 6143f81; do not merge until green; see lane-rules
red: web / react-apps-check (3); NEW: at eval (eval at evaluate (:311:30), <anonymous>:5:17) at UtilityScript.evaluate (<anonymous>:313:16) at UtilityScript.<anonymous> (<anonymous>:1:44) at rect (e (+3 more) is not red on the base 6143f81; do not merge until green; see lane-rules
red: web / react-apps-check (4); NEW: Expected: <= 2 Received: 2.5 at <anonymous> (/home/runner/_work/cmux/cmux/webviews/test/composer-location-strip.test.ts:450:57) (+2 more) is not red on the base 6143f81; do not merge until green; see lane-rules

CI fast guards failed on 08c03a59e2 (https://github.com/manaflow-ai/cmux/actions/runs/39557164933). 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 08c03a59e2 (run): no media. The tour did not run: only webview code changed (7 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 21 of 21 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 28 test failures on Blacksmith runners:

Failures

Test View Logs
test/agent-pane-column-edges.test.ts/agent-pane-column-edges.test View Logs
test/agent-pane-column-edges.test.ts/agent-pane-column-edges.test View Logs
test/agent-pane-ctrl-b-background.test.ts/agent-pane-ctrl-b-background.test View Logs
test/agent-pane-ctrl-b-background.test.ts/agent-pane-ctrl-b-background.test View Logs
test/agent-pane-math.test.tsx/agent-pane-math.test.tsx View Logs
test/agent-pane-math.test.tsx/agent-pane-math.test.tsx View Logs
test/agent-pane-no-capsules.test.ts/agent-pane-no-capsules.test View Logs
test/agent-pane-no-capsules.test.ts/agent-pane-no-capsules.test View Logs
test/agent-pane-queue-steer.test.ts/agent-pane-queue-steer.test View Logs
test/agent-pane-queue-steer.test.ts/agent-pane-queue-steer.test View Logs

...and 18 more test failures. View all on Blacksmith

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by projects-88 on cosmic-gray · session

teamleaderleo and others added 3 commits October 20, 2026 23:20
…p or Sources + there

"Subagent of", a branch pill or another harness shows a chat in the pane:
that chat's composer, queue and bars come back. The header's pull request chip
and the summary's Sources + are the chat's and stay off while the pane shows
the subagent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-aabc-7850-af29-f0655b1d2a1a&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

merge-audit: #22986 merged at 08c03a5 without no SHIP review receipt on the head, and its revert could not be opened (abort and get back to the state before "git revert",
hint: run "git revert --abort".
hint: Disable this message with "git config set advice.mergeConflict false"). Fix forward or revert it by hand.

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…s SubagentPaneFooter) (#23218)

#22986 added SubagentPaneFooter without a gallery entry, so gallery-coverage
fails on feat-cmux-next. The subagents entry gets an own-pane variant: a
subagent: reveal opens the child's view read only, the footer in place of the
composer.


Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-aabc-7850-af29-f0655b1d2a1a&host=cosmic-gray

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

Copy link
Copy Markdown
Contributor

Shipped in:

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