Repository navigation
feat(native-chat): show live background work and name each row by kind - #19705
Conversation
A child's label is raw provider text and was spliced into the command row unbounded, then the pair clipped to the description cap. A label at or past that cap clipped the command away entirely, leaving a row of kind 'command' that named an agent and showed no command - the failure qualification exists to remove, inverted. The same clip could also cut a surrogate pair, which boundSubagentField already guards against on the agent row two lines away. Give the label a reserved share and clip it the way the agent row does.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughClaude and Codex trackers now expose live background work while the spawning turn remains open. Foreground tasks settle at turn completion, while background tasks remain monitored. Codex command descriptions use bounded, surrogate-pair-aware clipping. Session monitoring no longer depends on an active turn identifier. Background task rows now use kind-specific icons, shorter labels, and stoppability-aware controls. Runtime capability negotiation filters non-stoppable rows for older readers. Command admission retains current-turn precedence. Priority: ➖ Normal Merge Risk: 🔵 Low · up to Live task disclosures preserve expansion across a temporary task-list gap, but changing the disclosure in another session may collapse a previously expanded session when returning to it. This is a bounded UI-state regression risk. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the implementation and verification, but it does not follow the required template. It omits the required ELI5, Why, Visual Proof, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. It also does not provide the required linked issue in the Resolution Complete the required template sections. Add an ELI5 summary, explicit rationale, a
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Important
The strip now shows foreground work, but the per-row Stop button it renders on that work is a silent no-op — see the inline comment. Worth resolving before merge; everything else looks solid.
Reviewed changes
- Live foreground work on the strip —
ClaudeBackgroundTaskTrackerandCodexBackgroundTaskTrackerstop blanking their rosters mid-turn (droppingforegroundTurnActive/primaryTurnId), andstructuredSessionBackgroundTasksViewdrops itsturnId === nullgate, so a fan-out of subagents reports while it runs. - Per-kind row labels and glyphs — a new
native-chat-background-task-kindsmodule names rows (Subagent/Shell command/Workflow/Monitor) and resolves glyphs through the shared tool-icon table;monitordraws the app-wide heartbeat. - Rescued label-bound command row —
boundLabelreserves a 96-char share of the 512-char description so a long child label can't clip the command away, and never cuts a surrogate pair. - Command-admission regression pin — a test pins that a live fan-out doesn't re-label the turn-open refusal.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
The strip suppressed itself in three places: the Claude tracker blanked its roster for the whole of any turn, the Codex tracker returned nothing while a primary turn was open, and the renderer view gated on `turnId === null`. Between them, work in flight was never shown — and a task backgrounded in an earlier turn vanished from the strip as soon as the next prompt was sent. Claude additionally dropped every foreground subagent, so a fan-out reported nothing at all. Report work while it is live, in all three layers. Foreground Claude work is turn-scoped, so `result` retires it — that is the provider's own outcome for a task it marked foreground, not a roster sweep. Nothing settles a Codex child on turn end: those keep reporting well past their parent, so turn frames only prompt a republish. Name each ROW by kind — Subagent, Shell command, Workflow, Monitor — instead of a generic "Background <kind>", each drawing the glyph the shared tool-icon table already uses for that category. A row that carries a provider description still shows it unchanged. The collapsed header summary is deliberately untouched; it is owned elsewhere. The conversation-command gate is unchanged in effect: an open turn already refuses first, and Claude foreground work never reaches the backgrounded set the gate reads.
9107c65 to
88204cd
Compare
There was a problem hiding this comment.
Important
No new issues in this delta — the monitor-glyph colour change is correct and well-tested. I'm holding approval only because the previously-flagged Stop-button no-op on foreground rows is still unresolved; these commits don't touch that path.
Reviewed changes
- Amber monitor heartbeat —
BackgroundTaskKindIconnow colours the monitor heartbeattext-yellow-500, matchingAgentStateDotand the sidebar'sStatusIndicator, so monitoring reads as one state app-wide; the other kinds stay muted. - Colour-pinning tests —
NativeChatBackgroundTasksStatus.test.tsxpins the heartbeat glyph and its amber againstAgentStateDot, and assertsagent/command/workflow/unknownrows stay muted.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
… honour
The strip now publishes foreground rows, but `stoppableTaskIds` still filters
on `backgrounded`, so `stopClaudeBackgroundTasks` resolved an empty target list
and returned `{ cancelled: false }` that no renderer reads: the user clicked
"Stop Subagent" and nothing ever happened.
Carry stoppability per row instead of widening the stop to a target the SDK has
no way to reach. `AgentSessionBackgroundTask.stoppable` is absent-means-yes, so
hosts that predate it keep their working control, Claude emits `false` only on
foreground rows, and the strip hides that row's button the same way it already
hides the stop-all a provider cannot honour.
`background_tasks_changed` lists BACKGROUNDED tasks, so a foreground subagent can never appear in it. Treating it as the whole world meant any such frame cleared every live foreground row mid-flight and then dropped every later foreground `task_started` for the rest of the session, killing the in-turn fan-out the strip exists to show in any session that ever backgrounds anything. Decide `backgrounded` before the staleness guard and apply the guard only to a backgrounded start, and retain live foreground entries across a roster replace. Retained rows count against MAX_TRACKED_TASKS, so the map stays bounded, and a stale backgrounded start the roster no longer lists is still dropped.
… defines it `MONITOR_GLYPH_COLOR`'s comment claimed a test held it and AgentStateDot's amber together, but no test imported it — the assertions hardcoded 'text-yellow-500', so the two could drift with every test still green. Read the colour from the module, which is what the comment always said was happening. Drop the unused `BackgroundTaskGlyph` export too: nothing outside the module names it.
The strip is now mounted on live work, so a sequential fan-out unmounts it between one subagent finishing and the next starting: local `useState` meant the expanded list collapsed itself on every such gap, on top of the strip flickering above the composer. Hand the disclosure to the session, keyed by session id so it does not leak across a session switch. The strip is now controlled and holds no state of its own, which is what makes it survive its own mount churn.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: b80afe3e-7ba6-42f0-b21c-c9927a7b1511
📒 Files selected for processing (10)
src/main/claude/claude-background-task-tracker.test.tssrc/main/claude/claude-background-task-tracker.tssrc/renderer/src/components/native-chat/NativeChatBackgroundTasksStatus.test.tsxsrc/renderer/src/components/native-chat/NativeChatBackgroundTasksStatus.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/native-chat-background-task-kinds.tsxsrc/shared/agent-session-wire.tssrc/shared/structured-agent-session-reducer.test.tssrc/shared/structured-agent-session-reducer.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
| onExpandedChange={(expanded) => | ||
| setExpandedBackgroundTasks({ sessionId: props.sessionId, expanded }) | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Store disclosure state for each session.
A user can expand session A, change the disclosure in session B, and then return to session A. Line 325 replaces the only stored record with session B. Lines 320-323 then collapse session A.
Store expansion values by sessionId. Add a test for A → B → A after both disclosures change.
Proposed fix
-type ExpandedBackgroundTasks = { sessionId: string; expanded: boolean }
+type ExpandedBackgroundTasks = ReadonlyMap<string, boolean>
- const [expandedBackgroundTasks, setExpandedBackgroundTasks] =
- useState<ExpandedBackgroundTasks | null>(null)
+ const [expandedBackgroundTasks, setExpandedBackgroundTasks] =
+ useState<ExpandedBackgroundTasks>(() => new Map())
- expanded={
- expandedBackgroundTasks?.sessionId === props.sessionId &&
- expandedBackgroundTasks.expanded
- }
- onExpandedChange={(expanded) =>
- setExpandedBackgroundTasks({ sessionId: props.sessionId, expanded })
- }
+ expanded={expandedBackgroundTasks.get(props.sessionId) ?? false}
+ onExpandedChange={(expanded) => {
+ setExpandedBackgroundTasks((current) => {
+ const next = new Map(current)
+ next.set(props.sessionId, expanded)
+ return next
+ })
+ }}There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Foreground rows withhold their Stop —
f1de6e3490adds an optionalstoppablefield to the wire task type; Claude publishesstoppable: falseon foreground rows and the strip'sbackgroundTaskStoppablehides the per-row Stop that would have silently no-op'd, resolving the only open hold from the prior review. - Aggregate roster scoped to backgrounded work —
70dda28fafstopsbackground_tasks_changedfrom wiping live foreground rows: those survive the roster replacement (still bounded byMAX_TRACKED_TASKS), and the stale-start guard now convicts onlybackgroundedstarts. - Expansion state survives a fan-out gap —
02da268af7lifts the strip'sexpandedstate to the parent, keyed by session, so a sequential fan-out that momentarily empties the roster no longer collapses the open list. - Monitor amber pinned to its constant —
1dd39889fcexportsMONITOR_GLYPH_COLORand re-pins the heartbeat/amber tests to it instead of a hardcoded string, so the strip and the monitoring dot can't silently drift.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Electron QA — first captures at
|
`boundLabel` avoided splitting a pair, then `qualifiedDescription` re-cut the COMPOSED string with a raw slice: label (<=96) plus separator plus description (<=512) is up to 611 chars, so that second cut landed at an arbitrary index inside the description and could publish a lone high surrogate — lossy through any non-JSON UTF-8 hop. `parse` had the identical hazard on an unqualified primary-thread command. One `boundText` helper now owns all three cuts, so no path in the file can emit a lone surrogate from well-formed input.
… lists Narrowing the admission guard to backgrounded starts left a finished FOREGROUND id with no defence: `replaceAggregateRoster` wiped `terminalTaskIds` wholesale, so after any `background_tasks_changed` a replayed `task_started` revived a task whose completion had already been seen — and only a later `result` could settle it again. Scope the wipe the same way the guard was scoped: delete only the ids the incoming roster actually enumerates. A roster still overrules terminal evidence for the work it lists, which is what that behaviour was added for.
…he newest Re-adding retained foreground entries after the roster made a live row the user is reading jump below the backgrounded rows on every `background_tasks_changed`, and the cap `break` kept the STALEST retained rows while dropping the newest. Merge in the tracked map's own order so a surviving row holds its position, and count the overflow up front so eviction takes the oldest retained rows. Roster entries are never starved and the map stays bounded either way.
A foreground `task_started` arriving with no turn open has no `result` coming to retire it, so it sat in the strip indefinitely — with no per-row stop, since foreground rows are not stoppable — and refused conversation commands behind an instruction nobody could follow. Settle on turn start as well as on `result`. This is cleanup only: visibility never consults `startsTurn`, so a missed one degrades to today's behaviour and can never switch the feature off. It shortens the row's life to the next turn; the case where no further turn is ever sent is filed separately.
…te them Rule 3 of remote-wire-compatibility: changing what the host publishes reaches old clients with no wire change. The Claude host published no foreground rows before this feature; it does now, and a client that cannot read `stoppable` draws a per-row Stop on every one of them — Claude always sets `supportsTaskStop` — which filters to the backgrounded ids, stops nothing, and returns a result no renderer inspects. That is the dead button `stoppable` was added to remove, reappearing across a version skew. Negotiate it. A client can advertise the existing background-task-stop capability and still predate `stoppable`, so this needs its own constant. Readers that do not advertise it get unstoppable rows dropped, and a state whose every row is dropped becomes no strip — exactly their pre-feature view. RUNTIME_PROTOCOL_VERSION is not bumped: this adds an optional field and a new negotiated capability, and changes no existing field's meaning, which is the explicit do-not-bump case in protocol-version.ts.
An indexed lookup into the fixture's task list is possibly-undefined under `pnpm tc`; the rows are more readable named anyway.
Electron QA — re-run at
|
| row | kind glyph | Stop |
|---|---|---|
| Ping loopback 400 times in background | terminal | yes |
| Ping loopback 500 times in background | terminal | yes |
| Ping loopback and count lines ×3 (foreground subagents) | bot | no |
That is f1de6e3490 working: stoppable: false on foreground rows, absent-means-yes on the backgrounded ones.
This frame also re-tests 70dda28faf. The prompt starts the two backgrounded shells first, then launches the foreground fan-out — the exact ordering that killed foreground rows at 88204cdfa5. All three subagent rows now appear and persist.
(c) The expanded list survives a gap in live work
I clicked the header once, during the first subagent, and never touched it again. Polling across the whole turn:
[19] strip:true exp:true working:true rows:["Ping loopback 70 times"]
[20] strip:false working:true <- roster empty, strip UNMOUNTED
[21] strip:false working:true
[22] strip:false working:true
[23] strip:true exp:true working:true rows:["Ping loopback 220 times"] <- remounted, still open
Before the gap:
After the gap:
The strip genuinely unmounted for three consecutive polls between the two sequential subagents, and came back expanded. That is 02da268af7 lifting expanded into NativeChatStructuredSession keyed by sessionId.
(d) Monitor row — not reproduced, and I believe it is not reachable this way
I did not get one, and I am not going to imply otherwise. A monitor row needs kind: 'monitor', which comes only from classifyClaudeBackgroundTaskKind(task_type === 'monitor'). task_type is read exclusively from provider frames — grepping src/main/ shows Orca never synthesizes one — and a composer-driven Claude session emits only local_agent and local_bash. So this needs a seeded journal row or a wire-level fixture, not a driven turn.
The amber glyph visible in the header of every capture above is the strip's monitoring indicator, a different element from BackgroundTaskKindIcon with MONITOR_GLYPH_COLOR. Given 1dd39889fc already pins that constant in a test, a live monitor-row capture may not be worth the fixture.
Still not covered
Packaged build, Windows/WSL/Linux/SSH, mobile, mixed-version client, and the Codex lane — none exercised here.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior review at 02da268, six commits landed:
- Phantom foreground cleanup at turn start —
ClaudeBackgroundTaskTracker.observenow settles foreground tasks onstartsTurn, so a foregroundtask_startedthat never receives aresultframe no longer lingers in the strip and can no longer block conversation commands nobody could follow. - Roster replacement keeps live foreground rows in place —
replaceTrackedmerges the aggregate roster with retained foreground rows, evicting the stalest retained row first (never the newest) while roster entries are never starved. - Terminal evidence scoped to roster ids —
replaceAggregateRosterclearsterminalTaskIdsonly for ids the roster actually lists, so a finished foreground id stays defended against a replayedtask_started. - Surrogate-safe command-row clipping everywhere —
boundText(value, max)generalizesboundLabel, andqualifiedDescriptionclips the composed row a second time surrogate-safely instead of a rawslice. - Row-stop capability gates unstoppable rows from legacy readers — a new
AGENT_SESSION_BACKGROUND_TASK_ROW_STOP_CAPABILITYdistinguishes readers that honourstoppable, andwithoutUnstoppableRowswithholdsstoppable: falserows from readers that predate the field, restoring their pre-feature view.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Electron UI evidence at Captured on an isolated macOS dev instance built from this branch (its own CDP port, its own renderer port, its own user-data profile), driving a real structured Claude chat session in a folder workspace. Full-window CDP screenshots, no cropping. 1 + 2 — live turn: foreground
|
…tion The web e2ee handshake started sending AGENT_SESSION_BACKGROUND_TASK_ROW_STOP_CAPABILITY, and this test asserts the advertised list by deep equality, so it went red on CI while every targeted test run stayed green. Add the capability in the position the router sends it.
…-out The strip unmounting between two sequential subagents is truthful, not a swept row: A leaves on the provider's own terminal frame, B does not exist yet, and backgrounded work spanning the same gap holds the roster open — so an empty roster is never work the strip is hiding. Also pins the previous-turn rule against the one the subagent roster already applies on the same frame: a still-working FOREGROUND child becomes `unverifiable` there and a backgrounded one is left alone, so the strip drops the first and keeps the second rather than asserting `live` for either.
Review status: three loops run, eleven defects found and fixed, CI greenReviewed across three independent loops against the merge base The core change is right, and the design holds up: turn end reveals work, it never settles it. What the loops found is that the three suppressions were load-bearing in ways the PR didn't account for — removing them exposed a dead control and a guard that silently killed the feature. Blockers found and fixed1. Claude foreground rows drew a Stop button that silently did nothing. Fixed with a per-row optional 2. Any Also fixed
Verification
Not changed, deliberatelyThe collapsed header still reads "Monitoring background tasks" while showing foreground work. #19311 owns that region and is rewriting it — reconciling here would only make both harder to merge. On the overlap with #19311 — a correction worth recordingIt is not the case that this PR owns the producer filters while #19311 owns the renderer gate. I checked both branches: each one independently stops the strip being suppressed mid-turn. #19311 keeps the Two practical consequences:
Also note Follow-ups worth filing, none blocking
Readiness checklist: PASS, no P0/P1, nothing required before merge. Not merging — leaving that to you. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Pin the empty-roster mid-turn gap — the new
empties only between one task retiring and the next startingtest documents that the strip blanks only in the truthful gap between a task's own terminal frame and the nexttask_started, and that backgrounded work spanning the same gap keeps the roster open. - Pin foreground settlement on turn start — the new
settles a previous turn the way the subagent roster settles ittest documents that a foreground child with noresultframe is settled by the next turn'sstartsTurn, while a backgrounded sibling survives untouched.
Both additions assert exact states (toBeNull / toEqual) and fail on the regressions they document; the tracker suite passes 23/23.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
#19311 landed the background-tasks strip rewrite this branch overlapped with. Both sides had independently removed the mid-turn suppression, so the shared view file conflicted loudly rather than auto-merging wrong. Resolved toward main wherever main was richer, keeping only what this branch adds that main does not have: - structured-session-background-tasks-view.ts takes main's shape whole (`show` mounts mid-turn, `isMonitoring` stays idle-only for the animated indicator and conversation commands). This branch's mid-turn contribution lives in the producers, not here. - claude-background-task-tracker.ts rebuilt from main's version — main moved its frame helpers out — with this branch's semantics re-applied: `liveInTurn` and its settle on `result`/turn start, aggregate-roster authority scoped to the backgrounded class it enumerates, terminal evidence kept for ids a roster never lists, and retained rows merged in place with the stalest evicted. - `stoppable` folded into main's shared backgroundTaskFieldsEqual. Taking main's reducer helper without that would have dropped the comparison silently, and a row losing its stop would be judged equal and never republished. - The strip component takes main's rewrite; only the per-row stop gate is re-applied, as an extra condition on main's settled check. - native-chat-background-task-kinds.tsx is deleted: main's roster module already owns kind labels and glyphs, and keeping both would leave a dead second vocabulary. NativeChatToolIcon's slot export is reverted with it. agent-session-wire.ts reached 301 of its 300-line budget, so the background-task wire block moved VERBATIM into agent-session-background-task-wire.ts, re-exported so every existing import path still resolves. No max-lines disable, no ratchet bump.
There was a problem hiding this comment.
Important
The merge with #19311 reverted this branch's per-kind row naming — see below.
Reviewed changes
Since the prior review at 00a9a138, the branch merged origin/main (bringing in #19311's settled-task roster) and reconciled its live-foreground / row-stop machinery against it:
- Merged #19311's settled-task roster —
settledTasksand thename/state/startedAt/totalTokensrow fields arrive through the newagent-session-background-task-wire.tsand theClaudeSettledBackgroundTasksretention split. - Kept
stoppableacross the wire split —agentSessionBackgroundTasksEqual(and the client reducer'sbackgroundTaskStatesEqual) now comparestoppable, andclaudeBackgroundTaskDetailstill emitsstoppable: falsefor foreground rows so the strip still withholds their Stop. - Wove
liveInTurn/settleForegroundTasksinto the settle lifecycle — foreground rows stay turn-scoped, settled rows stay backgrounded-only (so the capability projection never sees an unstoppable settled row), and the row-stop capability stays registered acrossRUNTIME_CAPABILITIES,remoteRuntimeClientCapabilities, bothipc/runtime.tspaths, and the web router.
⚠️ Merge reverted the "name each row by kind" naming
The merge replaced this branch's native-chat-background-task-kinds module with #19311's background-task-roster.ts, and with it the old labels and glyphs. backgroundTaskKindLabel now falls back to Background agent / Background command / Background workflow / Background monitor instead of the Subagent / Shell command / Workflow / Monitor this branch introduced, and glyphs draw from direct lucide-react imports rather than the shared NativeChatToolIconName table — so the PR's title ("name each row by kind") and its body's Subagent / Shell command claims no longer describe the shipped UI.
Technical details
# Reconcile the kind-label naming lost in the #19311 merge
## Affected sites
- `src/renderer/src/i18n/locales/en.json` — `components.native-chat.backgroundTasks.agent`/`command`/`workflow`/`monitor` reverted from `Subagent`/`Shell command`/`Workflow`/`Monitor` (this branch, `00a9a138`) to `Background agent`/`Background command`/`Background workflow`/`Background monitor` (#19311).
- `src/renderer/src/components/native-chat/background-task-roster.ts:38` — `backgroundTaskKindLabel` is the description-less row fallback; it now returns the generic `Background <kind>` labels.
- `src/renderer/src/components/native-chat/NativeChatBackgroundTasksStatus.tsx:48` — `KIND_ICONS` uses direct lucide imports (agent `Bot`, workflow `Workflow`, unknown `CircleHelp`); this branch resolved those through the shared `NativeChatToolIconName` table (`list-checks`, `wrench`).
- `src/renderer/src/components/native-chat/native-chat-background-task-kinds.tsx` — deleted by the merge (no stale references remain).
## Required outcome
- Either re-apply the `Subagent` / `Shell command` / `Workflow` / `Monitor` kind labels to `backgroundTaskKindLabel`, or accept #19311's naming and update the PR title/body so they no longer claim "name each row by kind".
## Open questions for the human
- Which naming is canonical? #19311's group headers (`Agents` / `Shell` / `Monitors` / `Workflows`) already read by kind; the singular kind-label fallback (`Subagent` vs `Background agent`) is the only point of divergence.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Ruling on follow-up 5 — the mid-turn blank strip is accepted as-isDecision: this is fine, and no fix is wanted. The strip going blank between sequential subagents is correct, because that is what the model actually does — after a child returns, the parent is thinking about what to spawn next, and during that window nothing is running. An empty strip is the honest rendering of an empty roster. This closes the item rather than deferring it. Specifically:
The two obvious "fixes" were correctly rejected as worse: a debounce would display finished work as though it were live, and keeping the strip mounted on an empty roster renders "Task details are unavailable for this session." Reserving the strip's slot to stop the transcript resizing remains a possible presentation change, but it is cosmetic and explicitly not required here. Please do not re-open this in a later review loop. |














Makes the native-chat background-tasks strip a truthful live view of work in flight, and names each row by what it actually is. Also rescues one commit stranded by the squash-merge of #19346.
Rescued from the squashed #19346 branch
#19346 was squash-merged, so
brennanb2025/codex-strip-produceris orphaned — none of its commits are ancestors ofmain.Checking what actually survived the squash:
mainis byte-identical to9b9d163863("keep a child's name on the command row that outlives it") across all four files it touched, so that fix did land. Its follow-up03d336aea1did not. That commit is carried here unmodified, with its original message and authorship.It matters on its own: a child's label was spliced into the command row unbounded and the pair then clipped to the description cap, so a label at or past that cap clipped the command away entirely — leaving a row of kind
commandthat named an agent and showed no command, inverting the qualification's purpose. It could also cut a surrogate pair.The strip suppressed itself in three places
Between them, work in flight was never shown:
claude-background-task-tracker.tsblanked its whole roster for the duration of any turn (foregroundTurnActive ? [] : …), so a task backgrounded in an earlier turn vanished the moment the next prompt was sent.codex-background-task-tracker.tsreturned nothing while a primary turn was open (primaryTurnId !== null).structured-session-background-tasks-view.tsgated onturnId === null, blanking the strip mid-turn for both providers regardless of what the producers published.Claude additionally dropped every foreground subagent (
if (!task.backgrounded) continue), so a fan-out reported nothing at all.All four come out. Work is reported while it is live.
What retires a row
Foreground Claude work is turn-scoped, so
resultretires it via aliveInTurnflag — that is the provider's own outcome for a task it marked foreground, not a roster sweep. Backgrounded work is never touched there; only its own terminal frame retires it.Nothing settles a Codex child on turn end. Those keep reporting well past their parent turn, so turn frames only prompt a republish. Turn end reveals; it never settles.
Row labels and glyphs
monitordraws the amber heartbeat (Activity,text-yellow-500) thatAgentStateDotand the sidebar'sStatusIndicatoralready use — monitoring is one idea app-wide and a second glyph would split it. That survived the merge intact, in both the header segment and the expanded row, via a singlekindIconTonesource so the two cannot drift apart. The other kinds stay muted: they mark a category, whereas monitoring is a state the app already colours.The collapsed header summary now comes from #19311, which merged while this was in review — it reads
3 agents · 2 shells · 1 monitorwith per-kind glyphs, replacing the flat "Monitoring background tasks" this branch was originally written against.Command admission is unchanged in effect
conversationCommandBlockedrefuses only conversation commands (/clear,/compact), never message sending. It checksactiveStructuredAgentSessionTurnIdbefore the background-task branch, so mid-turn the open-turn refusal fires first — showing more work cannot add or re-label a refusal. Post-turn the blocking set is unchanged, because Claude foreground work is retired atresultand never reaches the backgrounded set the gate reads. Pinned by test.Verification
Driven on a real isolated dev instance (own CDP port, renderer port and profile,
ORCA_BACKGROUND_LAUNCH=1), both providers mid-turn withdata-native-chat-working="true":spawn_agentchild plus a persistent background shell reported live while the turn was open.The monitor-heartbeat tests were ablation-checked — reverting the glyph to
eyeturns them red, restoring turns them green.