fix(agent-chat): a sub-session card shows its prompt's opening once
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:
- its
doingline, which for a fresh session is acpmux's title taken from the prompt's opening words, cut with an ellipsis; - 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-twicereproduces 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 checkand 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 |
|---|---|
![]() | ![]() |
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

