Skip to content

fix(agent-chat): a sub-session card shows its prompt's opening once - #27240

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/orch-subsession-dedupe
Oct 29, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/orch-subsession-dedupe

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-29, word for word:

"this doubling up is kinda weird? first line then whatever goes next"

What was doubled

A sub-session's card in the transcript (the card for an acpmux new --parent child: name, model, Working, Open chat) showed:

  1. its doing line, which for a fresh session is acpmux's title taken from the prompt's opening words, cut with an ellipsis;
  2. right under it, the prompt preview, starting with the same words.

The fix

SubsessionCallCard.tsx: a start's card now passes the prompt it shows to SessionCard, which leaves out the doing line when it only repeats that prompt's start. The comparison (repeatsPrompt) works on words, ignoring case, whitespace, a trailing ellipsis and a last word cut mid-word. Any other line still shows: a real step ("Read src/net/RetryBanner.tsx"), a wait, an error, or a line that only shares a few words. The header row, Open chat, "Show prompt" and "Raw" are unchanged.

Tests

  • webviews/test/subsession-card-prompt-once.test.ts: the cut, ellipsized opening line counts as a repeat; step lines, "Working on: …", a different session's opening and an empty line don't.
  • New gallery state agent-pane.subsession-cards#prompt-not-twice reproduces Leo's case: a fresh ios-remote session whose only line is its prompt's opening. Gallery health on the entry renders all 9 states with an empty verdict.
  • Local bun run check and prepush-gate pass.

Before / after

Gallery agent-pane.subsession-cards#prompt-not-twice, rendered by the gallery health runner. This entry's stage is dark-themed, so both stills are dark.

Before After
before after

risk:normal.

Changelog

  • Fixed: a sub-session's card in the agent chat no longer shows its prompt's opening twice.

Agent session: agent session

🤖 Generated with Claude Code

A freshly started sub-session's card showed its doing line, which acpmux
derives from the prompt's opening words, and then the prompt preview right
under it, starting with the same words. The doing line is left out when it
only repeats the prompt shown under it (compared on words, ignoring case,
whitespace, a trailing ellipsis and a last word cut mid-word). Any other
line (a real step, a wait, an error) still shows.

Leo, 2026-10-29: "this doubling up is kinda weird? first line then whatever goes next"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Review cbed145: 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=pr27240 -f ref=lane/orch-subsession-dedupe -f platform=macos -f backend_mode=local

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

CI failed on cbed145f52 (run 40841291472 attempt 1): 1 code, 1 unknown.

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

Failures:

  • seen on other PRs transcript-fold-no-blank-space-browser.test.ts a long turn with notifications, bookkeeping and messages draws no blank space, folded or open: failed (job)
Matched log lines
web / react-apps-base-check (4): (fail) a long turn with notifications, bookkeeping and messages draws no blank space, folded or open [654.19ms]

Not re-run automatically: web / react-apps-base-check (4), 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: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 52c918f to compare; do not merge until green; see lane-rules
red: web / Web status; base red: the same failure on the base 52c918f; does not block
red: web / react-apps-base-check (4); no finished base run on 52c918f to compare; do not merge until green; see lane-rules
red: web / react-apps-check; base red: the same failure on the base 52c918f; does not block

Gallery before/after for cbed145: 16 states rendered, 18 images differ, 613 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 40839013896 -R manaflow-ai/cmux -n gallery-advisory-27240-cbed145f52351de5768e2f60fd6e4eaccb8f0d1f (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.subsession-cards/prompt-not-twice Apple System Colors Light new 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/prompt-not-twice Apple System Colors new 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/recorded Apple System Colors changed 0.0027% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/recorded Apple System Colors Light changed 0.0023% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/recorded-wait Apple System Colors Light changed 0.0024% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/recorded-wait Apple System Colors changed 0.0024% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/started Apple System Colors Light unchanged 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/started Apple System Colors unchanged 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/avatars Apple System Colors Light changed 0.0031% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/avatars Apple System Colors changed 0.0028% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/messages Apple System Colors Light unchanged 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/messages Apple System Colors unchanged 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/replies Apple System Colors Light unchanged 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/replies Apple System Colors unchanged 0% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/pending Apple System Colors changed 0.15% own SubsessionCallCard.gallery.ts
agent-pane.subsession-cards/pending Apple System Colors Light changed 0.105% own SubsessionCallCard.gallery.ts
agent-pane.agent-runs/before Apple System Colors Light changed 0.0853% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/before Apple System Colors changed 0.0354% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/card-running Apple System Colors changed 0.0529% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/card-running Apple System Colors Light changed 0.0397% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/card-done Apple System Colors Light unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/card-done Apple System Colors unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/card-child Apple System Colors Light unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/card-child Apple System Colors unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/group Apple System Colors Light changed 0.0262% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/group Apple System Colors changed 0.0174% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/line Apple System Colors Light unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/line Apple System Colors unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/summary Apple System Colors Light changed 0.0512% imports SubsessionCallCard.tsx (1 hops)
agent-pane.agent-runs/summary Apple System Colors changed 0.0433% imports SubsessionCallCard.tsx (1 hops)
agent-pane.coderouter-offer/claude-key Apple System Colors Light unchanged 0% imports SubsessionCallCard.tsx (1 hops)
agent-pane.coderouter-offer/claude-key Apple System Colors unchanged 0% imports SubsessionCallCard.tsx (1 hops)

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

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 9 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpppilulcu/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpzjxxwpa3/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
test/transcript-fold-no-blank-space-browser.test.ts/
transcript-fold-no-blank-space-browser.test
View Logs
test/transcript-fold-no-blank-space-browser.test.ts/
transcript-fold-no-blank-space-browser.test
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 2c1d8dc

BLOCK

  1. [P2] repeatsPrompt treats every final-word prefix as a truncated prompt, even without an ellipsis (webviews/src/agent-session/acpmux/conversation/SubsessionCallCard.tsx:64). A normal step such as Fix bug with prompt Fix bugs in parser returns true, so line 101 hides a real doing line. Only allow prefix matching when the original line actually ends in an ellipsis, and add a regression test.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
review-27240-2c1e found repeatsPrompt let any line end on a prefix of the
prompt's word, so a real step like "Fix bug" under the prompt "Fix bugs in
parser" was hidden. A line may stop mid-word only when it ends in an
ellipsis (the cut title acpmux derives from the prompt); otherwise every word
must match exactly. Regression test added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 3c6acae

BLOCK

  1. SubsessionCallCard.tsx:100 — The production doing fallback is "Working on: " + prompt, so repeatsPrompt never matches because it compares from the first word. Fresh sessions therefore still show the duplicated prompt line; the new gallery fixture omits the Working on: prefix and does not cover this path. Strip the prefix before comparison and add a regression case using the actual server output.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
…pening

review-27240-3c6a: a session that has not reported a step yet gets acpmux's
doing line "Working on: <prompt, cut>" (hub/subsession_send.rs), so the card
still showed the prompt's opening twice behind that prefix. repeatsPrompt
strips the prefix before comparing; tests cover it, and that another session's
or a real step's "Working on:" line is still shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 0ccbee6

BLOCK

  1. webviews/src/agent-session/acpmux/conversation/SubsessionCallCard.tsx:55 unconditionally removes a leading Working on: from the live line. Normal session-list lines can be the raw prompt, so a valid prompt beginning with Working on: (for example, Working on: inspect the parser) will not be recognized as a repeat and will still be shown twice. Compare the original line first, or only strip the prefix when the stripped form matches the prompt.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
review-27240-0ccb: stripping acpmux's "Working on:" prefix every time meant a
session-list line that is the raw prompt, when that prompt itself starts with
"Working on:", was no longer seen as a repeat. repeatsPrompt now compares the
line as it came first, and the line without the prefix only when it had one.
Tests cover a prompt that starts with "Working on:", with and without
acpmux's prefix on top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 1acab67

BLOCK

  1. SubsessionCallCard.tsx — line includes failed-session errors from line 107, so repeatsPrompt can hide diagnostics that begin with the prompt. For example, prompt Run tests for parser and error Run tests leaves only the generic failed state. Apply suppression only to actual doing lines; preserve errors.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
…prompt

Codex review of #27240 at 1acab67: the prompt dedupe also ran on a failed
session's error, so an error that starts like the prompt left only the bare
failed state. Only a doing line is compared now; an error always shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at cbed145

SHIP

No blocking findings. All seven helper tests passed in isolated Node execution. Full Bun tests were unavailable because Bun and dependencies aren’t installed.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Base-red evidence for web / react-apps-base-check (2) at cbed145 (run 40839014352). I ran the shard's annotated failures locally (Node 24, bun) on base 66f4014f7e2 and on the head merged onto that base (743937da90e). The same 7 tests fail on both, the same way:

  • clickable-cursor: no stylesheet sets the arrow or auto on a clickable element
  • motion-scale: no webview CSS, TS or TSX animates off the scale (computerUse/computerUsePreview.css:235, 150ms)
  • agent-pane-pending-steer: Send now on a waiting steer…
  • settings/rowSummary: both 60-character tests
  • settings/chiefLook: both Bubble Style tests

The other annotated files pass on both: agent-pane-running-layout, agent-pane-short-pane-composer, chat-environment-scroll-stability, thread-minimap-left-rail-stays and transcript-parked-stream (15 pass).

This PR changes only SubsessionCallCard.tsx and its own test. No failing test is its own.

@teamleaderleo
teamleaderleo merged commit d65a680 into feat-cmux-next Oct 29, 2026
193 of 202 checks passed
@teamleaderleo
teamleaderleo deleted the lane/orch-subsession-dedupe branch October 29, 2026 08:58
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

teamleaderleo added a commit that referenced this pull request Oct 29, 2026
* fix(agent-chat): a sub-session card shows its prompt's opening once

A freshly started sub-session's card showed its doing line, which acpmux
derives from the prompt's opening words, and then the prompt preview right
under it, starting with the same words. The doing line is left out when it
only repeats the prompt shown under it (compared on words, ignoring case,
whitespace, a trailing ellipsis and a last word cut mid-word). Any other
line (a real step, a wait, an error) still shows.

Leo, 2026-10-29: "this doubling up is kinda weird? first line then whatever goes next"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b

* fix(agent-chat): only an ellipsized line may repeat its prompt mid-word

review-27240-2c1e found repeatsPrompt let any line end on a prefix of the
prompt's word, so a real step like "Fix bug" under the prompt "Fix bugs in
parser" was hidden. A line may stop mid-word only when it ends in an
ellipsis (the cut title acpmux derives from the prompt); otherwise every word
must match exactly. Regression test added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b

* fix(agent-chat): acpmux's "Working on:" line counts as the prompt's opening

review-27240-3c6a: a session that has not reported a step yet gets acpmux's
doing line "Working on: <prompt, cut>" (hub/subsession_send.rs), so the card
still showed the prompt's opening twice behind that prefix. repeatsPrompt
strips the prefix before comparing; tests cover it, and that another session's
or a real step's "Working on:" line is still shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b

* fix(agent-chat): a prompt that starts with "Working on:" still dedupes

review-27240-0ccb: stripping acpmux's "Working on:" prefix every time meant a
session-list line that is the raw prompt, when that prompt itself starts with
"Working on:", was no longer seen as a repeat. repeatsPrompt now compares the
line as it came first, and the line without the prefix only when it had one.
Tests cover a prompt that starts with "Working on:", with and without
acpmux's prefix on top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b

* fix(agent-chat): a failed sub-session's error is never taken for its prompt

Codex review of #27240 at 1acab67: the prompt dedupe also ran on a failed
session's error, so an error that starts like the prompt left only the bare
failed state. Only a doing line is compared now; an error always shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-64a0909b0412bbd5174b

* feat(agent-pane): make sub-session cards disclosure rows

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(agent-pane): preserve disclosures and summarize live child sessions

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(agent-pane): keep session groups visible and translate full labels

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(agent-pane): reveal nested session disclosures for chat search

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(agent-pane): highlight each session prompt once in chat search

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(agent-pane): retain raw search matches hidden by Markdown

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(gallery): open grouped sessions before checking uploaded avatars

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

* fix(agent-pane): translate grouped session starts as one sentence

Agent-Session: https://cmux.com/deeplink/agent?id=aid-289f5b14ddf157d9472f

---------

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

This branch was previously deployed

1 inactive deployment
ci-routing-agent — cbed145f Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #75687
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