Repository navigation
feat(native-chat): show Codex subagent activity instead of opcode rows - #18773
Conversation
Codex spawns subagents and reports their lifecycle, but Orca rendered only gray `codex · item:subAgentActivity` opcode rows. Build the real display: one summary row per spawn group with a live working count and token usage. State is accumulated from `subAgentActivity.kind` alone. A live probe against app-server 0.152.1 showed `agentsStates` arrives empty even in a real subagent run, and that every activity item is delivered twice (item/started and item/completed), so every transition is idempotent and terminal states latch. Children never receive `thread/started`, so there is no nickname, role, or depth to read; the row labels from the trailing segment of `agentPath`. Two sweeps keep a row from claiming work forever: the parent turn's terminal event settles still-running children, and session start marks a pre-restart roster unverifiable rather than exited, since Codex resume replays no non-message items and no event can ever settle them. The roster rides a new NativeChatBlock variant paired with a plain-text twin. A journal item kind could not be used: that union is closed, and an unknown kind parses as malformed, which is the corrupt-journal class that can hide the chat tab. Block types are explicitly admissible when unknown, so an older client drops the block and renders the sentence. MessageRow moves out of NativeChatMessageList to keep both files under the max-lines budget without a disable.
There was a problem hiding this comment.
Important
This PR adds 16 string-literal translate('components.native-chat.subagents.*') keys in NativeChatSubagentRun.tsx but never registers them in src/renderer/src/i18n/locales/en.json. pnpm run verify:localization-catalog (a step in .github/workflows/pr.yml) fails on every one, so CI blocks the PR until they are added.
Reviewed changes
- Codex subagent roster — accumulates
subAgentActivityitems (each delivered twice, viaitem/started+item/completed) into one revised-in-place journal row per spawn group, carried as a newsubagent-groupblock with a plain-text twin for clients that lack the block type. - Turn/session sweeps — a child still
workingat turn end becomesunverifiable(loss of contact ≠ exit); the renderer reconciles a restored roster the same way. - Renderers —
NativeChatMessageRow/NativeChatSubagentRunrender the roster (live working count, worst-settled verdict, summed token totals);MessageRowmoves out ofNativeChatMessageListto stay under max-lines without a disable.
⚠️ components.native-chat.subagents.* keys are not registered in en.json
NativeChatSubagentRun.tsx introduces 16 string-literal translate('components.native-chat.subagents.*') keys, but the diff does not touch src/renderer/src/i18n/locales/en.json. The catalog verifier extracts these keys and fails on each missing one — it runs as part of pnpm lint and as its own step in .github/workflows/pr.yml, so the localization gate blocks this PR.
Technical details
# Missing localization catalog entries
## Affected sites
- src/renderer/src/components/native-chat/NativeChatSubagentRun.tsx:57-213 — 16 `translate()` keys under `components.native-chat.subagents.*` with no `en.json` entry
## Required outcome
- Register every key in `src/renderer/src/i18n/locales/en.json` so `pnpm run verify:localization-catalog` passes.
## Suggested approach
- Run `pnpm run sync:localization-catalog` (the `--fix` form) to add the 16 keys with their string fallbacks.ℹ️ Nitpicks
CodexSubagentRosterinsrc/main/codex/codex-subagent-roster.tscollides with the existingCodexSubagentRostertype insrc/shared/codex-subagent-roster.ts(the agent-hook-listener's per-pane subagent map). Two unrelated concepts now share one name; a distinct name for the new class would avoid confusion.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
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: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughAdds Codex subagent activity parsing, token tracking, bounded roster persistence, and settlement handling. Adds shared journal and native chat schemas for subagent groups. Adds fallback text, transcript metadata clipping, provider-frame classification, and tool-folding support. Adds native chat rendering with expandable subagent rosters, status summaries, elapsed time, and token counts. Adds coverage for translation, roster behavior, rendering, schemas, and frame disposition. Merge Risk: 🟡 Moderate · up to Native chat now presents subagent activity as roster rows, but an evicted live roster group can lose previously recorded child activity when revised later. This can make subagent status history incomplete and should be resolved or explicitly accepted before merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description gives a detailed explanation of the change, rationale, implementation, known limitations, and tests. However, it omits the required linked issue, visual proof section, review section, agent-skill boundary checklist, notes, and checklist items. The testing section also does not confirm manual testing or supported platforms. Resolution Add the required template sections and complete them. Include a valid issue reference under Linked Issue, attach before/after visual proof or state N/A with a reason, confirm manual testing and tested platforms, complete the Agent skill upstream boundary, Notes, and Checklist sections, and document review status. ✨ 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.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 989a23c4-c86c-466a-b232-b19338b267c3
📒 Files selected for processing (19)
src/main/codex/codex-structured-journal-limits.tssrc/main/codex/codex-structured-journal-translation-subagents.test.tssrc/main/codex/codex-structured-journal-translation.tssrc/main/codex/codex-subagent-activity.tssrc/main/codex/codex-subagent-roster.test.tssrc/main/codex/codex-subagent-roster.tssrc/main/native-chat/agent-session-wire/provider-frame-disposition.test.tssrc/main/native-chat/agent-session-wire/provider-frame-disposition.tssrc/renderer/src/components/native-chat/NativeChatMessageList.tsxsrc/renderer/src/components/native-chat/NativeChatMessageRow.tsxsrc/renderer/src/components/native-chat/NativeChatSubagentRun.test.tsxsrc/renderer/src/components/native-chat/NativeChatSubagentRun.tsxsrc/renderer/src/components/native-chat/NativeChatToolRun.tsxsrc/renderer/src/components/native-chat/native-chat-tool-fold.test.tssrc/shared/agent-session-journal-schemas.tssrc/shared/native-chat-subagent-summary.test.tssrc/shared/native-chat-subagent-summary.tssrc/shared/native-chat-tool-fold.tssrc/shared/native-chat-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
| if (typeof oldest !== 'string' || oldest === groupId) { | ||
| break | ||
| } | ||
| this.groups.delete(oldest) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Do not evict active group state without preserving it.
If more than 32 groups exist, Line 222 drops the oldest group state. If that group later receives an activity event, groupFor recreates it with an empty entries map and writes the same durable identity. That revision removes previously recorded children from the roster row. If no later event arrives, its working children also cannot be settled during settleSession().
Keep active groups until they settle, or persist enough evicted state to continue revisions and settlement. Add a regression test with 33 groups and a later event for the first group.
The row led with a glyph that swapped on state — a check once every child completed, a group icon otherwise — so a group appeared to change identity the moment it settled. Per the approved mock, the glyph names the category and never moves: state is carried by the status dot and the tone of the words beside it. Use lucide `bot`, the same glyph the individual `subAgentActivity` rows take in the eight-category vocabulary, so the summary reads as their parent. Slot and glyph are the mock's 16px/14px, muted by default, and the svg is `aria-hidden` — the headline is what a screen reader announces, so the icon never stands alone.
There was a problem hiding this comment.
Important
The glyph change is clean, but the localization-catalog failure from the prior review is still present — the components.native-chat.subagents.* keys remain unregistered in src/renderer/src/i18n/locales/en.json, so verify:localization-catalog still blocks CI.
Reviewed changes
- Stable bot glyph — the subagent summary row now leads with a fixed
Botglyph (SubagentGlyph,aria-hidden) instead of state-dependentCheck/Usersicons, so a settling row never appears to change identity. Added tests assert the glyph persists across all six states and that the word (not the icon) carries the accessible name.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…bagent-worklog # Conflicts: # src/renderer/src/components/native-chat/NativeChatMessageList.tsx # src/renderer/src/components/native-chat/NativeChatMessageRow.tsx
…write, and failure reporting * Restore the exhaustive block handling that adding `subagent-group` to `NativeChatBlock` broke. `formatWorkerTranscriptMessage` and `boundBlock` both fell through to `image-ref` field access, so `tsc -p` failed for the CLI and node projects and `build:cli` could not emit. Both now guard on `image-ref` explicitly and give the roster block its own branch. * Stop the roster's publish from evicting its own append. The sink queue coalesces by `coalescingKey` alone with no op-kind check, so passing the append's key to `tryPublish` spliced the queued append out and the row never reached the journal — permanently, since `lastSerialized` was already set. `tryPublish()` now takes no argument, matching every other call site. The regression test's fake sink honours the key, which the previous fake did not. * Keep `collabAgentToolCall` substantive. Only the MultiAgentV2 path emits `subAgentActivity`, so a V1 turn has no roster row; suppressing its collab tool calls too would have left a V1 fan-out showing nothing at all. * Surface a settled failure while siblings still work. The summary now reports the worst adverse outcome independently of the group verdict, so the row shows `3 working +1 failed` with a failed-coloured dot instead of a neutral pulsing dot. The plain-text twin names it too. * Treat `/morpheus` as a child. Only `/root` is the turn itself; the old segment-count test silently dropped a valid single-segment agent. * Refresh token-usage recency on update so an active thread is not evicted as the oldest entry, and scope the `agentsStates` comment to the V2 path.
There was a problem hiding this comment.
Important
The delta's fixes are correct and well-tested, but the PR is still not mergeable: the localization-catalog gate is red. The 16 components.native-chat.subagents.* keys in NativeChatSubagentRun.tsx remain unregistered in src/renderer/src/i18n/locales/en.json, and pnpm run verify:localization-catalog (a .github/workflows/pr.yml step) still fails on each one. pnpm run sync:localization-catalog clears it with the string fallbacks.
Reviewed changes
- Root-node detection — corrected
isCodexRootAgentActivityto a literalagentPath === '/root'match, so single-segment child paths like/morpheusare counted as children instead of being dropped as the parent turn. - Token-usage recency — re-inserted the thread key (
deletethenset) inhandleTokenUsageso the LRU eviction scan sees recency; a plainsetkept the original insertion position and would age out an active thread. - Journal write — stopped the roster
write()from reusing the append'scoalescingKeyontryPublish(); the queue coalesces by key alone with no op-kind check, so the publish was splicing the still-queued append out and the row never reached the journal. - V1 collab tool calls — reverted
collabAgentToolCallfromstatus-chromeback to substantive, because only the MultiAgentV2 path emitssubAgentActivity; suppressing collab tool calls rendered a V1 fan-out blank. - Adverse outcomes — added
adverseState/adverseCount(failed/stopped/unverifiable) tosummarizeSubagentGroup, surfaced immediately on the row (+1 failed) while siblings still work, and carried the count into the plain-text fallback twin.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…every second The roster row is an `aria-live="polite"` region and it contains the elapsed clock, which reticks once a second for as long as the fan-out runs. A screen reader therefore reads out a fresh duration every second, burying the state changes the live region exists to report — the headline, the verdict, and the `+1 failed` alert. No other live region in the transcript does this. `NativeChatToolRun`'s live button holds only the active tool label, and in `NativeChatWorkingStatus` the variant that shows a duration is precisely the one with no `aria-live`. Hide the clock from the accessibility tree only while it is moving. Once the group settles the duration is fixed, so it stays readable and costs no announcements.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Important
The clock-suppression fix is correct and well-tested — no new issues in this delta. The PR is still blocked, however, by the unaddressed localization-catalog gate: the 16 components.native-chat.subagents.* keys in NativeChatSubagentRun.tsx remain unregistered in src/renderer/src/i18n/locales/en.json, so pnpm run verify:localization-catalog (a .github/workflows/pr.yml step) still fails. pnpm run sync:localization-catalog clears it.
Reviewed changes
- Live-region clock suppression — while children are still working, the once-per-second elapsed clock is now wrapped in
aria-hidden, so thearia-live="polite"row stops announcing a fresh duration every second (which was burying the state changes the live region exists to report). Once the group settles, the clock stops ticking and its now-fixed duration becomes readable again; two new tests assert the wrapper in each state.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 55136d07-98ee-49ad-b18b-d365e9067f8e
📒 Files selected for processing (21)
package.jsonsrc/cli/handlers/orchestration/worker-output.tssrc/main/codex/codex-structured-journal-limits.tssrc/main/codex/codex-structured-journal-translation-subagents.test.tssrc/main/codex/codex-structured-journal-translation.tssrc/main/codex/codex-subagent-activity.tssrc/main/codex/codex-subagent-roster.test.tssrc/main/codex/codex-subagent-roster.tssrc/main/native-chat/agent-session-wire/provider-frame-disposition.test.tssrc/main/native-chat/agent-session-wire/provider-frame-disposition.tssrc/main/runtime/orchestration/worker-transcript-payload.tssrc/renderer/src/components/native-chat/NativeChatMessageRow.tsxsrc/renderer/src/components/native-chat/NativeChatSubagentRun.test.tsxsrc/renderer/src/components/native-chat/NativeChatSubagentRun.tsxsrc/renderer/src/components/native-chat/NativeChatToolRun.tsxsrc/renderer/src/components/native-chat/native-chat-tool-fold.test.tssrc/shared/agent-session-journal-schemas.tssrc/shared/native-chat-subagent-summary.test.tssrc/shared/native-chat-subagent-summary.tssrc/shared/native-chat-tool-fold.tssrc/shared/native-chat-types.ts
💤 Files with no reviewable changes (1)
- package.json
🚧 Files skipped from review as they are similar to previous changes (12)
- src/renderer/src/components/native-chat/native-chat-tool-fold.test.ts
- src/renderer/src/components/native-chat/NativeChatToolRun.tsx
- src/shared/native-chat-tool-fold.ts
- src/main/codex/codex-structured-journal-limits.ts
- src/main/native-chat/agent-session-wire/provider-frame-disposition.test.ts
- src/main/codex/codex-structured-journal-translation-subagents.test.ts
- src/main/codex/codex-subagent-roster.ts
- src/main/codex/codex-structured-journal-translation.ts
- src/main/codex/codex-subagent-activity.ts
- src/renderer/src/components/native-chat/NativeChatSubagentRun.tsx
- src/shared/agent-session-journal-schemas.ts
- src/shared/native-chat-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.
|
Visual proof of the Codex subagent spawn-group roster in native chat. These states were synthetically seeded into the agent-session journal (not captured from a live Codex subagent run). Screenshots are of the real rendered Orca UI. DOM reads (button
No A no-failure-only in-flight row ( Captured against revision |
…readings Four defects from a third review pass over the Codex subagent roster. `write()` set `lastSerialized` before the append and rolled it back only when the APPEND was refused. A refused PUBLISH left it set, so an identical replay short-circuited and the revision was never published again. The repo's own pattern is the opposite: `codex-structured-item-streams.ts` advances `checkpointLengths` only once the append AND the publish are both accepted. Roll back on either half. That alone did not cover the sweep, which is the LAST event a group ever gets: its `changed` guard skips the write on a retry because every child has already latched, stranding the settled roster's final revision. Write when the previous attempt was refused part-way, too. `formatWorkerTranscriptMessage` read `block.agents` as its exhaustive fallback. The journal schema deliberately admits block types this build does not know and `client.call` casts the RPC result instead of validating it, so a newer remote host's block reached that line and threw `agents is not iterable`, taking down the whole `worker read`. It printed a harmless `[image omitted]` before. Match `subagent-group` explicitly and degrade the unknown case. The elapsed clock measured to `now` whenever no child carried a terminal timestamp. That is exactly the roster restored from the journal after the host died: the reconciler latches `unverifiable` without a `settledAt`, so a child that ran four seconds reported the time since the crash as its run length, on a row that is not even counting. Show no duration when none is known. Also restores package.json to origin/main: the merge had deleted one of main's two duplicate `bench:terminal-partial-escape-tail` keys. Behaviour-preserving (JSON is last-wins and the deleted line was the dead one), but unrelated to this PR and better left to its own change. No gate rejects duplicate JSON keys. The new refusal tests also cover the append-side rollback, which had none.
There was a problem hiding this comment.
Important
The three correctness fixes in this delta are sound and well-tested, but the PR is still not mergeable. The 16 components.native-chat.subagents.* keys in NativeChatSubagentRun.tsx remain unregistered in src/renderer/src/i18n/locales/en.json, and pnpm run verify:localization-catalog (a .github/workflows/pr.yml step) still fails on every one. pnpm run sync:localization-catalog clears it. This was flagged in prior reviews and is unchanged by this delta — I'm carrying it forward because it blocks CI.
Reviewed changes — one new commit since the prior pullfrog review.
- Refused-publish retry —
CodexSubagentRoster.write()now resetslastSerializedtonullwhen the append or the publish is refused, so an identical redelivery isn't suppressed and a settled roster's final revision can't strand;sweep()re-writes wheneverlastSerializedisnull. - Unknown-block degradation —
formatWorkerReadnow matchesblock.type === 'subagent-group'explicitly and falls back to[unsupported block]for any block type this build doesn't know, instead of reading.agentsoff a shape that has none (a newer host's block previously threw and took down the wholeworker read). - No phantom duration — the subagent row's elapsed clock now renders only when
workingor a terminalsettledAtexists, so a roster restored after a host crash stops reporting "time since the crash" as the child's run length.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…ed turn
`NativeChatToolRun` bailed out for a completed turn whose activity disclosure
is collapsed before it reached the branch that draws a roster-only run. That
guard exists to push TOOL activity behind the turn-status disclosure, and it
fires on exactly the shape a spawn group has: a roster message carries no tool
blocks, so `selectActiveToolCall` returns null and `isSettled` is true, while
the list passes `expandOverride={expandedTurnIds.has(turnKey)}` — false until
the reader opens that turn — and `activeTurnIsWorking={false}`.
That is the default state of every finished turn in the transcript, so the one
compact row this feature exists to leave behind ("Ran 3 subagents") disappeared
the moment its turn ended. Worse, `MessageRow` counts a spawn group as
renderable specifically so the row survives, then rendered a wrapper around a
component that returned null — the empty ghost bubble its own guard is written
to prevent.
Order the roster branch before the disclosure guard. A roster has no tool
activity to hide, and the guard's reasoning ("a failed child command looked
like the whole response was still running") does not reach it. Runs that do
carry tool blocks still fall through to the guard unchanged, and in practice a
roster never shares a message with them: it is its own `role: 'system'` journal
row and `isToolOnlyMessage` is false for it, so `foldToolMessages` never merges
tool blocks into it.
Also drop childless groups when building the rows, so `subagentRows.length`
stays an honest test of "something will draw" — the roster-only branch returns
a margin-bearing wrapper on the strength of it, and a group with no children
renders null.
Both tests fail with their fix reverted; the existing NativeChatToolRun suite
still passes, so the completed-turn disclosure behaviour is unchanged.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Roster survives settled turns —
NativeChatToolRunnow orders the roster-only branch (blocks.length === 0) before the completed-turn disclosure guard, so a roster message keeps drawing its "Ran N subagents" row after its turn finishes instead of falling through the guard and rendering a ghost bubble. - Childless groups dropped — childless spawn groups are filtered before building
subagentRows, sosubagentRows.lengthstays an honest test of "something will draw" and a group with no children renders nothing (NativeChatSubagentRunreturns null onsummary.total === 0). - Two regression tests — both new cases (roster visibility on a collapsed completed turn, and a no-op for an empty group) fail with the fix reverted; the existing
NativeChatToolRunsuite still passes, confirming the disclosure behaviour for tool-carrying runs is unchanged.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Visual proof re-captured at
|
Every defect this feature has shipped so far lived in the assembly between
rows, and the row-level suites kept passing through all of them. Loop 4's
regression — a settled roster swallowed by the completed-turn disclosure —
was found by reading the code, not by a test, and an independent visual-proof
run observed the same symptom in the real UI and routed around it rather than
reporting it. `NativeChatToolRun` rendered alone is handed `expandOverride`
and `activeTurnIsWorking` by the test author, so it agrees with whatever the
caller was assumed to pass.
Drive the real component instead. The roster is its own `role: 'system'`
journal row carrying the producer's two blocks (structured + plain-text twin),
so what reaches the DOM depends on `foldToolMessages`, the turn-key mapping
and the disclosure state `NativeChatMessageList` owns — none of which a row
test exercises.
Three cases, on one assembled transcript that holds tool calls AND a roster:
- a settled turn with activity collapsed, the resting state of the whole
transcript, still shows the row (fails with loop 4's reorder reverted);
- tool activity stays behind that disclosure and appears only on expand,
and expanding draws no second roster (fails with the guard removed);
- a working turn reads as a live spawn.
The first also pins that the plain-text twin is dropped rather than printed
beside the row it stands in for.
Timestamps are explicit and ascending: the list re-sorts by (timestamp, id),
so rows sharing a millisecond tie-break alphabetically and the user turn can
sort last, stranding the roster outside its own turn and reconciling live
children to `unverifiable`.
No production code changed.
There was a problem hiding this comment.
Important
The new message-list coverage is clean and passing (12/12), but the PR is still not mergeable: the localization-catalog gate is red. The 16 components.native-chat.subagents.* keys in NativeChatSubagentRun.tsx remain absent from src/renderer/src/i18n/locales/en.json, and pnpm run verify:localization-catalog still fails on each one (re-verified this run). This predates the current commit and is unchanged by it — pnpm run sync:localization-catalog clears it.
Reviewed changes
- Message-list-level roster tests — added a
NativeChatMessageList spawn-group rostersuite that drives the real list over an assembled transcript (tool calls + roster row), pinning that a settled turn with collapsed activity still shows the "Ran 2 subagents" row, tool activity stays behind the disclosure (expanding draws no second roster), and a working turn reads as a live spawn — plus that the plain-text twin is dropped rather than printed beside the block it stands in for.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…ree for a spawn group
`MessageRow` counts any `subagent-group` block as renderable, but
`NativeChatSubagentRun` renders null for a childless roster. A group with
`agents: []` therefore mounted a row that drew nothing — an empty div that still
costs the transcript one `gap-5` slot. The Codex producer never writes one (every
`write()` call site operates on a group that already holds an entry), but the
block schema admits `agents: []` with no `.min(1)`, and the wire is where such a
shape would arrive.
Narrow `subagentGroupBlocks` — whose only production caller IS that renderable
check — to the groups that will draw, behind a named `isRenderableSubagentGroup`
that `NativeChatToolRun` now shares in place of its own copy of the predicate, so
the two guards cannot drift apart again. A childless group carrying its
plain-text twin now prints the twin, which is what the twin is for; a bare one
skips the row entirely.
Also correct four comments that had stopped describing the code:
- the roster header called `agentsStates` "always empty", contradicting the
probe note in `codex-subagent-activity.ts` — it is empty on the MultiAgentV2
path that emits these items, and the V1 path does populate it;
- `tokensByThread` was documented "retained UNCONDITIONALLY" while
`handleTokenUsage` LRU-caps it 65 lines below;
- the sweep is not "the LAST event a group ever gets": neither `settleTurn` nor
`settleSession` removes the group, so a later `thread/tokenUsage/updated`
naming a swept child still writes it. The retry condition is right; only its
stated reason was wrong;
- the `subAgentActivity` classification is not reached "for every event — and
every one of them arrives twice". `handleSubagentItem` intercepts those items
before `items.handle`, so the live path never consults the catalog;
`restoreThread` replays them straight through, and is the real consumer.
Comment-only apart from the childless-group guard.
There was a problem hiding this comment.
Important
The delta itself is clean — the "counts as renderable" / "actually draws" reconciliation is correct and well-tested — but the PR is still not mergeable. The 16 components.native-chat.subagents.* keys in NativeChatSubagentRun.tsx remain absent from src/renderer/src/i18n/locales/en.json, so pnpm run verify:localization-catalog (a .github/workflows/pr.yml step) still fails on each one (re-verified this run). This predates the current commit and is unchanged by it; pnpm run sync:localization-catalog clears it.
Reviewed changes — one new commit since the prior pullfrog review.
- Renderable predicate reconciled — extracted
isRenderableSubagentGroupintosrc/shared/native-chat-subagent-summary.tsand applied it in bothsubagentGroupBlocks(whichNativeChatMessageRowuses to decide whether to mount the roster row and drop its plain-text twin) andNativeChatToolRun's roster filter, so a childlesssubagent-groupblock no longer mounts an invisiblegap-5slot. - Two regression tests — a
childless spawn groupdescribe block asserts a bare childless group mounts no row and that a childless group with a text twin falls back to the twin instead of suppressing it; both fail with the predicate split reverted.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
The producer ALWAYS writes a roster block beside a plain-text twin carrying the
same sentence, for clients that cannot draw the block. The renderer honours that
contract from one side — it draws the block and drops the twin. The CLI honoured
neither side: it printed the twin as prose AND rendered the block as
`[subagents] <same sentence>`, so a real roster message read
[system] Ran 2 subagents (1 failed)
[subagents] Ran 2 subagents (1 failed)
Take the mirror of the renderer's rule, which is the cleaner half for a text
client: the twin IS the sentence, so print it and drop the block it stands in
for. A block that arrives WITHOUT its twin — a shape the wire admits and no
producer writes — still stands in for itself, because dropping it
unconditionally would lose the roster entirely. Either way the sentence prints
exactly once, off the same `subagentGroupFallbackText` helper both sides use.
Unreachable through `readWorkerTranscript` today, whose provider rollout decoder
never emits a `subagent-group` block — but the formatter is the CLI's contract
for any transcript source, and the shape is already producible.
The test pinned a TWIN-LESS group, a body `codexSubagentGroupBody` never writes:
it asserted the exact double-print this fixes was correct output, and would have
blessed either behaviour. Rebuild the fixture as the producer's real two-block
row, with the sentence taken from the shared helper rather than hardcoded so it
cannot drift, and assert the sentence appears exactly once. The twin-less shape
keeps a test of its own, labelled as the wire-only fallback it is.
Also record why `settleTurn` keys on the RAW `turnId` while `groupFor` remaps
off-primary activity onto the primary's active turn. The asymmetry is
load-bearing, not an oversight: were `settleTurn` to remap, a child thread
ending its own turn would sweep the parent group and settle every still-working
sibling to `unverifiable`. The lookup missing is the intended no-op.
|
the model provider had a temporary upstream failure. The provider refused or dropped the request mid-run — nothing in your repo or your credentials is at fault. Re-trigger Pullfrog; if it keeps happening, check the provider's status page.
|
…row its twin filters The roster row called 16 `components.native-chat.subagents.*` keys that were never added to the catalog, failing the localization gate. Synced en.json; the English strings are the component's own inline fallbacks, so nothing renders differently. Also tightens the twin/block handoff on both readers. The renderer dropped every text block once a roster was present, which is safe only because Codex writes a roster as its own message — the block is provider-agnostic, so a lane folding prose in beside one would have lost it on desktop while mobile kept it. And both readers decided "the twin is already printing" by recomputing the sentence and comparing bytes, which a roster from a newer build never matches: its unknown state normalizes to `unverifiable` here, so the CLI printed the roster twice with two different verdicts. Both now recognize a twin by shape.
Both readers use it to decide the twin is already printing, so a false positive eats a message's real prose and a false negative prints the roster twice.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — two commits since the prior pullfrog review.
- Subagent localization keys registered — the 16
components.native-chat.subagents.*keys used byNativeChatSubagentRun.tsxare now insrc/renderer/src/i18n/locales/en.json, clearing the catalog gate that has blocked CI since the first review (verify:localization-catalogexits 0, re-verified this run). worker readtwin detection by shape, not recompute —formatWorkerReadnow detects the roster's plain-text twin withisSubagentGroupFallbackTextinstead of byte-comparing a recomputed sentence, so a roster written by a newer build (whose unknown state reads asunverifiable) no longer prints its sentence twice.- Roster twin filter narrowed —
NativeChatMessageRowdrops only the twin text block beside a roster block, so real prose sharing a message with a roster is preserved (mobile, which reads raw blocks, already kept it).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one test-only commit since the prior pullfrog review.
- Twin recognizer pinned against prose —
native-chat-subagent-summary.test.tsgains anisSubagentGroupFallbackTextsuite asserting the shape-matcher accepts every sentencesubagentGroupFallbackTextproduces (including an unknown state likecancelledthat this build reads asunverifiable) and rejects prose that merely mentions subagents (I kicked off 2 subagents to look at this,Ran 2 subagents and then cleaned up,Ran two subagents). No production code changed; 13/13 pass.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Caution
This merge broke the node build. src/main/runtime/orchestration/worker-transcript-payload.ts references an undefined warnings identifier inside the subagent-group branch — pnpm tc:node fails with three TS2304: Cannot find name 'warnings' errors, so the PR cannot typecheck or merge.
Reviewed changes
- Merged
origin/main— the single new commit is a two-parent merge pulling main's refactor ofworker-transcript-payload.ts(boundBlock's parameterwarnings: Set<string>→state: TranscriptBoundState, withclipMetadata/clipText/markClippednow threaded onstate) plus theformatWorkerReaddetails refactor inworker-output.tsand thenativeChatToolActivityLabeltool-row refactor in the renderer. subagent-groupclipping branch left on the old parameter name — the branch this PR added before the merge still callsclipMetadata(…, warnings), which no longer resolves; the surrounding code was correctly renamed tostate, so this is an incomplete conflict reconciliation, not a pre-existing defect.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
`git add -A` swept up the pnpm-lock.yaml mutation that every pnpm invocation leaves in this repo. Nineteen lines, thirteen of them @pnpm/exe, and it fails sixteen unrelated CI checks — native smoke, typecheck, packaging, xterm patch sync — none of which name the lockfile.
…bagent-worklog # Conflicts: # src/cli/handlers/orchestration/worker-output.ts # src/main/codex/codex-structured-journal-translation.ts
Inlining the subagent routing helper lost its null check: the roster returning null means it did not claim the item, and the translator must keep looking. Returning unconditionally once any thread item parsed swallowed every ordinary item — twelve settlement tests, none of them about subagents.
There was a problem hiding this comment.
Important
This delta is clean, but the PR is still not mergeable. The critical typecheck break flagged in the prior review (5126775652) is unchanged: src/main/runtime/orchestration/worker-transcript-payload.ts still passes warnings to clipMetadata at lines 136/139/140 inside boundBlock (whose parameter is now state: TranscriptBoundState), and pnpm tc:node still fails with three TS2304: Cannot find name 'warnings' errors (re-verified this run).
Reviewed changes — three commits since the prior pullfrog review.
- Dropped the
@pnpm/exelockfile drift — removed the@pnpm/exeimporters/packages/snapshots a merge staged intopnpm-lock.yaml; no source change. - Deduplicated the transcript formatter — the CLI's
formatWorkerTranscriptMessagemoved out ofworker-output.tsinto the sharedsrc/shared/worker-transcript-text.ts(already used byterminal read), so a roster row renders identically from one copy instead of two. - Restored the item fall-through — the
subAgentActivityrouting was inlined (readCodexNotificationThreadItem+subagents.handleItem); a prior merge had dropped the null-admission fall-through that lets non-subagentitem/started/item/completedframes reachitems.handle, and this restores it so ordinary items are no longer swallowed. - Extracted
settleCodexOversizedNotificationFrame— the oversized-notification arm moved tocodex-structured-journal-translation-frames.tsso the translator reads as routing rather than shape checks.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…bagent-worklog # Conflicts: # src/renderer/src/i18n/locales/en.json
There was a problem hiding this comment.
Important
This delta is a clean merge reconciliation — no new issues — but the PR is still not mergeable. The critical typecheck break flagged in prior reviews (5126775652, 5128166075) is unchanged: src/main/runtime/orchestration/worker-transcript-payload.ts:136/139/140 still passes the undefined warnings identifier to clipMetadata inside boundBlock (whose parameter is now state: TranscriptBoundState), and pnpm tc:node still fails with three TS2304: Cannot find name 'warnings' errors (re-verified this run). The fix is a three-line rename: clipMetadata(block.groupId, warnings) → clipMetadata(block.groupId, state), likewise for agent.id and agent.label.
Reviewed changes
- Merged
origin/main— the single new commit pulls in four main-side commits (editor Shift+wheel combined-diff scrolling, mobile-push revert, structured/clear//compactcommands, skills-guide trim) with no overlap into the PR's own code. - Deduplicated
structuredSessionLaunchFailedDescription—en.jsoncarried two copies of the key (an artifact of an earlier merge); the reconcile drops the duplicate, keeps thesubagents.*block intact, and picks up main's newconversationCommandkeys. The catalog still validates.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…d state Main renamed clipMetadata's second parameter from a warnings set to a TranscriptBoundState. The subagent-group arm still passed `warnings`, and git merged both sides without a conflict because the lines never overlapped — the rename and the new arm are in different hunks. Typecheck was the only thing that could catch it, and did.
There was a problem hiding this comment.
ℹ️ The critical typecheck break is fixed and the delta is clean. One prior nitpick (the misplaced doc comment) remains open and is the only thing standing between this PR and approval.
Reviewed changes — one commit since the prior pullfrog review.
- Rebound the
subagent-grouparm tostate—boundBlock'ssubagent-groupbranch now threadsstate(not the stalewarningsidentifier) throughclipMetadataforgroupId,agent.id, andagent.label. This resolves the critical typecheck break flagged in reviews 5126775652 and 5128166075;pnpm tc:nodenow exits 0 (re-verified this run).
The only remaining open finding is a non-blocking nitpick carried forward from review 5128166075: src/main/codex/codex-structured-journal-translation.ts:227 still carries /** Routes a \subAgentActivity` item to the roster; null when it is not one. */abovesettleOversizedNotification, which routes oversized notifications — the comment is wrong and redundant after handleSubagentItem` was inlined away. Deleting it clears the last open thread.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Main's #19055 added a `subAgentActivity` arm to the provider activity table, which is reached only through `publishActivity`. The roster's admission returned above that call, so every `subAgentActivity` item bypassed it and a fan-out that reports nothing else left the turn tail stuck on the previous frame's text. `publishActivity` already no-ops on a refused admission and on a non-primary thread, so routing the roster's admission through it is safe. Also corrects a docstring the frames extraction copy-pasted onto `settleOversizedNotification`.
…rries it The spawn-group arm was the one collection in the worker-transcript payload with no cap, and the one block type mobile's `sanitizeBlock` forwarded verbatim. The producer's `MAX_CODEX_SUBAGENTS_PER_GROUP` does not reach either boundary: the journal schema declares no maximum on `agents`, and a remote host may run a build with a different cap. Both transports now cap the roster and bound `id`, `label` and the open `state` string; `label` and `id` also take the standard inline bound on the journal write path, where every other provider string already does. A token count is now persisted onto its entry at write time. `write` rebuilt `tokens` from the LRU-capped thread map on every write, so an eviction silently retracted a count the durable row had already shown. Adds the first coverage of the three roster caps, including the group eviction that rewrites a row from N children down to one.
…ck honest The roster-only escape is keyed on `blocks.length === 0`, so a spawn group sharing its message with tool-call blocks fell through to the settled-turn guard, which returned bare null and took the roster with it — the exact regression the escape above was written to avoid, after the message row had already counted the group as renderable. Unreachable for Codex today; the block type is deliberately provider-agnostic, so it is live for the Claude lane. The elapsed clock also froze at a sibling's timestamp on a partial sweep: in a group where one child completed and another is unaccounted for, the ended turn left `working === 0` with the completed child's `settledAt`, and the row showed that child's duration as the group's run length. No clock is drawn while any child is `unverifiable` with no terminal timestamp.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — three commits since the prior pullfrog review.
- Published the turn tail for roster-claimed items —
subAgentActivityframes now route throughpublishActivityinstead of a barereturn, andsubAgentActivityjoinedCODEX_ITEM_ACTIVITY, so the turn's activity indicator reads "Coordinating with another agent" even when the roster claims the item. The prior review's misplaced doc comment abovesettleOversizedNotificationwas also corrected. - Bounded the roster on every boundary — provider-supplied
id/labelstrings are bounded at journal write; per-child token counts are persisted into the group entry so LRU eviction of the token map can't retract a count the row already showed; the worker transcript caps spawn groups and clipsgroupId/id/label/state; and a newnative-chat-rpc-block-sanitize.ts(extracted fromnative-chat.ts) boundssubagent-groupblocks for mobile. - Kept the roster beside tool calls and its clock honest —
NativeChatToolRun's settled-turn guard now returns the roster rows instead of null, so a group sharing a message with tool calls stays visible after the turn finishes; the elapsed clock is suppressed whenever a child isunverifiablewithout asettledAt.
The new tests are exact-value assertions that fail on revert, and I verified pnpm tc:node exits 0 with the affected node and renderer suites passing (148 tests). This resolves the last open thread; the PR is mergeable.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…ing them `boundInlineText` computes a sha256 and a Buffer BEFORE it checks the length, so the roster paid two digests per child on every write even when nothing was truncated — and `write()` runs on every claimed activity item (each delivered twice) and again from `handleTokenUsage`, which streams. A same-process A/B over a 64-child group: 76.5 us/write before, 2.0 us/write after (plain, unbounded row is 1.2 us). The cap changes with the mechanism. 16 KB is the tool-output bound; both readers of this row already clip the same fields to 512, so the producer was admitting ~2 MB per durable roster row for consumers to throw ~97% of away. One `MAX_SUBAGENT_FIELD_CHARS` now serves the producer and both readers, and the marker is an ellipsis rather than the tool-output truncation sentence — `id` is the roster key and the renderer's React key. Also raises the orchestration arm's per-group bound from 20 to the producer's 64, matching the mobile arm: a 21-64 child group is routinely producible here, so that arm clipped children and warned while its sibling clipped none. The slice and warning stay as the transport's own defence against a remote host with a larger cap.
`hasTwin` was a single boolean over the whole message, so a message carrying two `subagent-group` blocks and one plain-text twin printed one sentence and dropped the second roster with no marker. Count the twins and claim one per group instead. Not reachable from this branch's producer, which writes one group per journal item, but the surrounding reasoning is explicitly about wire shapes the producer never writes and this is the adjacent one it missed.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — two commits since the prior pullfrog review.
- Bounded the roster's provider strings with one shared constant —
MAX_SUBAGENT_FIELD_CHARS = 512now lives innative-chat-subagent-summary.tsand is used by the producer (boundSubagentField, now a plain length check instead of the sha256-digestingboundInlineText) and both readers (worker-transcriptclipMetadataand the mobile block sanitize). The worker-transcript subagent cap was raised 20 → 64 to matchMAX_CODEX_SUBAGENTS_PER_GROUP. The switch offboundInlineTextloses no redaction — that helper only bounds and digests, never redacts — so no security surface changed. - Suppressed one roster block per twin, not all of them —
formatWorkerTranscriptMessagenow counts twin text blocks (unclaimedTwins) and consumes one persubagent-groupblock, so a message carrying two roster blocks and one twin prints both sentences instead of silently dropping the second roster. The new test drives the exact producer shape and asserts one occurrence per group.
All three caps (512 chars, 64 children) are consistent across the producer and both readers, and the new tests are exact-value assertions that fail on revert.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Five defects loop 2's own fixes introduced. Twin claiming was order-blind: the count-based claim silenced whichever roster block came first, so a lone twin belonging to a LATER group erased an earlier group's roster and printed the later sentence twice. Exact-text claims are now settled for every group before any leftover twin is claimed by position; the positional fallback stays for a newer build's frozen twin, which can never equal a recomputed sentence. `boundSubagentField` sliced UTF-16 units and could leave a lone high surrogate in a durable row, and the clip removed exactly the tail that told two children apart — `id` is the renderer's React key and `claimLabel` writes its repeat ordinal at the end. It now backs off a split pair and reserves the child index inside the bound, so both readers' re-clip cannot cut the disambiguator off again. `MAX_SUBAGENT_FIELD_CHARS`'s doc claimed a `groupId` bound the producer never applies; the doc now says so and why. The worker-transcript metadata cap is a separate literal again: it governs message ids, turn ids, tool-call names and image urls, so a roster-motivated change must not move it.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one commit since the prior pullfrog review.
- Indexed, surrogate-safe field clipping —
boundSubagentField(value, index)now reserves a…~${index}suffix out of the 512-char bound for clipped providerid/labelstrings, so two children sharing a long prefix no longer collapse to one React key / oneclaimLabelordinal; the slice backs off a lone high surrogate so no malformed code unit reaches the durable row. - Twin claiming by text, then position —
claimSubagentGroupTwinssettles exact-text matches for every group before any positional fallback, so a lone twin is claimed by the group it names regardless of block order; thenull-line filter on the finaljoinalso removes the blank line a suppressed group left behind. - DRY item-type key and metadata-bound decoupling —
CODEX_ITEM_CLASSIFICATIONSnow keys onCODEX_SUBAGENT_ITEM_TYPEinstead of thesubAgentActivityliteral, andMAX_WORKER_TRANSCRIPT_METADATA_CHARSis a standalone512literal so a future roster-motivated change toMAX_SUBAGENT_FIELD_CHARScannot silently move the transcript bound.
The new tests are exact-value assertions that fail on revert (suffix …~0/…~1, surrogate-pair round-trip through UTF-8, distinct ids/labels across clipped children, twin claimed by text in both leading and trailing positions). I verified pnpm tc:node exits 0 and the five affected suites pass (91 tests).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Review status: ready to mergeFull re-review of this PR on its current head. The branch had absorbed roughly 205 commits of Head moved Two blockers, both from merge seams that git merged cleanlyNeither produced a conflict, because the changed lines never overlapped. The turn tail stopped updating during a fan-out. The orchestration transcript arm had no collection cap. It was the only A performance regression the review itself introducedBounding Other fixes
Verification
Visual proof from a real structured Codex session with three real spawned subagents is in this comment — live, expanded, settled, and coexisting with ordinary tool rows, captured on a hidden renderer with the served module verified against this branch. Those captures were taken at Known limitations, unchanged and documented in codeGroup eviction past 32 groups, and a restart on an One note for follow-up: the mobile sanitize arm added here sits on |
QA drove a real Codex session with three live `spawn_agent` children and sent a mid-turn correction. The roster row immediately read "Ran 3 subagents / 3 unverifiable" with no clock, while all three were still running — they reported `completed` 57-87s after that turn ended. Both sites rested on the same false premise: that a turn ending means no event will ever settle a child. Children outlive their turn and keep reporting into the same group. - Renderer: drop `reconcileSubagentRoster`. Nothing plumbed to the component distinguishes a row written by a dead host from a turn that merely ended — journal render items carry no epoch, and a new epoch deletes the rows of the one it supersedes — so the row now draws the state the journal recorded. Under-claiming beats over-claiming. - Main: stop sweeping on `turn/completed`. That sweep wrote `unverifiable` into the DURABLE journal, which mobile reads with no reconciliation. `turn/completed` is Codex's only turn-end notification, so an abort cannot be told apart from a clean finish; the safe default is not to sweep. `settleSession` — the provider actually being gone — is unchanged and is now the only sweep. `unverifiable` stays non-latching so a late verdict still lands.
The mid-turn correction opens a new turn, so the fan-out's row stops being
the current turn and the list hands the roster `activeTurnIsWorking={false}`.
Asserted through the list, not the component, because that prop is what
carried the wrong claim.
`settleSession` only fires when the provider goes away while this process is alive. If the host itself dies, nothing sweeps and nothing reconciles on restore, so a `subagent-group` row persisted as `working` claimed live children forever — the mirror of the defect the previous commit fixed, and the same `ssh-execution-boundary.md` violation in the other direction. Reconciled host-side, at journal open, not in the renderer: mobile shows only the durable text twin and reconciles nothing, so a renderer-only fix would leave it claiming live children indefinitely. Opening the journal is also the one moment a host can honestly say the previous writer is gone. - `staleSubagentRosterRevisions` rewrites every child still reading `working` to `unverifiable` and regenerates the twin from the same summary, so the block and the sentence cannot disagree. - No terminal timestamp: the child stopped being observable at an unknown moment, and stamping the reopen would report the downtime as its run length. - Revises in place under the parsed identity, so a reopen upserts the row rather than appending a duplicate, and a second reopen writes nothing. - Skipped on a corrupt load: that journal is still owed a rebuild from provider history, and content past the repair's free sequence retires the demand. Reconciles journal ROWS, not roster state — the producer's in-process group map is untouched, so the roster's known seeding limitation is unchanged, as is `canReplaceSubagentState`: `unverifiable` still does not latch.
There was a problem hiding this comment.
Important
Removing the renderer's roster reconciliation also removed the only safety net for the crash/restore case, so a working child the host never got to settle now renders as live forever on desktop.
Reviewed changes — two commits since the prior pullfrog review.
- Dropped the turn-end sweep —
CodexSubagentRoster.settleTurnand its call incompleteTurnare gone;settleSession(fired onevent.type === 'ended') is now the sole writer ofunverifiable. The rationale is sound:spawn_agentchildren outlive their turn and keep reporting into the same group, andturn/completedis the only turn-end notification Codex sends, so a turn boundary can't tell an abort from a clean finish. - Dropped the renderer reconciliation —
reconcileSubagentRosterand theactiveTurnIsWorkingprop threading intoNativeChatSubagentRunare removed; the roster now draws every child state exactly as the journal recorded it. - Pinned the QA seam — new tests at the translator, roster, subagent-run, and message-list levels assert a mid-turn correction that opens a newer turn leaves live children
working(nounverifiable, noRanheadline), and that a verdict landing after the turn ended still reports.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| block: NativeChatSubagentGroupBlock | ||
| }): React.JSX.Element | null { | ||
| const [open, setOpen] = useState(false) | ||
| const agents = block.agents |
There was a problem hiding this comment.
Removing reconcileSubagentRoster also removes the only reconciliation for a roster restored after the writing host is gone. settleSession runs only on event.type === 'ended', so a crash, force-quit, or lost contact (SSH) that never emits ended leaves the durable block's working children permanently — and this component now draws them as live, pulsing, with a ticking clock, indefinitely. That is the liveness-collapse docs/reference/ssh-execution-boundary.md forbids, and it contradicts the PR body, which still says the desktop renderer reconciles working outside the live turn.
Technical details
# Restore the session-liveness reconciliation (keyed on session, not turn)
## Affected sites
- src/renderer/src/components/native-chat/NativeChatSubagentRun.tsx:164 — `const agents = block.agents` draws state verbatim; the removed `reconcileSubagentRoster` was the only place a stale `working` became `unverifiable`.
- src/main/codex/codex-structured-journal-translation.ts:129 — `settleSession` runs only on `event.type === 'ended'`, so a host that dies without a clean end never writes `unverifiable`.
## Required outcome
- A `subagent-group` block whose children are `working` must not render as live (`N working`, pulsing dot, ticking clock) once the session that wrote it is no longer live. The turn-boundary signal must stay unused for this (children outlive turns), but a session-liveness signal must reconcile `working` → `unverifiable`.
## Suggested approach (optional)
- The renderer already has the authoritative session signal at `NativeChatMessageList.tsx:238` (`isWorking || session.transcriptLifecycle?.state === 'working'`). Thread that session-level liveness (not `isCurrentTurn`) into the roster and reconcile `working` → `unverifiable` when it is `false`, mirroring the old `reconcileSubagentRoster` but keyed on the session rather than the turn.
- Alternatively, if this is deliberately accepted, update the PR body's "Carrier" section, which currently asserts the desktop renderer reconciles `working` outside the live turn.There was a problem hiding this comment.
Addressed in 09531c6 — staleSubagentRosterRevisions reconciles a stale working roster to unverifiable on journal open (and moves the twin), so the producer now states the truth the dead host couldn't.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
AFTER visual proof — mid-turn correction with three real Codex subagents (the after half of the reported before/after scenario). A Codex agent drove this capture through Playwright CDP against a hidden Orca Electron renderer, launched with Critical result: PASS. Immediately after submitting the second “MID-TURN CORRECTION” message, the original roster still showed “Kicked off 3 subagents” / “3 working” / “31s”. Expanded states were style: working, git: working, ssh: working, with no Code and route verification:
1. AFTER — real fan-out running (clock at 28s; three working children) 2. AFTER — immediately after the mid-turn correction (31s; all three still working) 3. AFTER — same roster after genuine completion (clock frozen at 1m 57s) 4. AFTER — expanded completed roster with per-child labels and states This verifies the requested local structured Codex scenario; remote execution and other providers were not exercised. |
Update: the escalated defect is fixed, with before/after proofLive QA on this branch found a real defect after my earlier summary, and it turned out to be two defects resting on one false belief. Head is now What QA sawThree real The belief that caused it, and the measurement that disproves itTwo places assumed that once a turn ends, a child still marked
New children were still joining the same group after the correction. Both sites fixedThe renderer was the live bug. It mapped The main-process sweep on A regression the first fix opened, and closedRemoving the renderer reconcile closed the over-claiming bug and opened its mirror: after a host crash, a persisted It is fixed at journal open rather than in the renderer, because mobile renders only the durable text twin and reconciles nothing — a renderer fix could never reach it. Any persisted roster child still reading One deliberate exception, which reads like an oversight without the reason: the reconcile is skipped on a corrupt journal. A corrupt journal already carries a demand to rebuild from provider history, and that demand is retired the moment anything is written past the repair's free sequence. Writing a reconcile row would trade a slightly more honest stale row for a silently abandoned rebuild — and the rebuild fixes the roster anyway, correctly, from source. The stale row is bounded and self-healing; a retired rebuild demand is permanent and leaves a truncated journal nobody knows to repair. Proof, and exactly which evidence covers which fixBefore and after, both from real structured Codex sessions with real spawned subagents on hidden renderers, with the served module verified against the branch. The after-capture drives the exact scenario that broke: immediately after the mid-turn correction the roster still reads "Kicked off 3 subagents / 3 working / 31s" with every child working, and only reads "Ran 3 subagents" once all three genuinely complete, with the clock frozen at a duration matching the journal span. The three fixes are not all covered by the same evidence, so rather than leave that to inference:
The captures were taken at Every fix above was ablated red/green — reverted, the specific test confirmed failing, then restored. Remote execution and other providers were not exercised. A pattern worth knowing if you touch these files nextThree defects in this PR took the same shape: main added something adjacent, this branch's older code silently voided it, and git reported no conflict because the lines never met. The Verification at
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one commit since the prior pullfrog review.
- Settled stale rosters at journal open — new
staleSubagentRosterRevisions(journal-subagent-liveness.ts) reconciles anysubagent-grouprow still carrying aworkingchild tounverifiablewhen a journal is reopened, and rewrites the plain-text twin to match (Ran 2 subagents (1 unverifiable)), so mobile — which renders only the twin — also stops asserting liveness the dead host observed. Wired throughopenJournalStoreState/restoreJournalStore, skipped on read-only and corrupt loads, and it touches onlyworkingchildren with no synthesizedsettledAt, so a reader reports an unknown run length rather than "time since the host died". - Tests —
journal-subagent-liveness.test.tspins the reconcile end-to-end: a live row readsworkingbefore the host dies andunverifiableafter reopen with the twin moved; the row is revised in place rather than appended; reopens are idempotent; settled/plain/unparseable rows are left alone.
This resolves the crash/restore liveness-collapse flagged in the prior review, and does so on the producer side, which also fixes the twin for text-only clients.
One non-blocking follow-up: the PR description's prose still describes the pre-e708790b design — the "Two sweeps" section, the "Carrier" claim that "the desktop renderer reconciles the block's working to unverifiable outside the live turn", and the "Known cost" line about "the turn-end sweep". Those no longer match the shipped behavior (there is no turn-end sweep; reconciliation happens at journal open on the producer). Worth a refresh so the description matches the code.

















What
Codex spawns subagents and reports their full lifecycle. Orca rendered gray
codex · item:subAgentActivityopcode rows and nothing else. This adds the real display: one summary row per spawn group, with a live working count, per-state settling, and token usage.Built against live protocol capture, not the schema alone
I drove
codex app-server0.152.1 directly and captured a real subagent spawn (137 frames, 2 threads). Three things the schema does not tell you, each of which would have produced a broken implementation:agentsStatesarrives empty ({}) even in a real subagent run. The obvious design — read the state map — yields a permanently empty roster. All state here is accumulated fromsubAgentActivity.kind.item/started, once viaitem/completed. Every transition is idempotent; 4 wire deliveries produce exactly 1 journal row, and that is asserted.thread/started— it fires once, for the root. There is noagent_nickname,agent_role, ordepthto read. The row labels from the trailing segment ofagentPath(/root/list_directory→list_directory).Token totals are summed as latest snapshot per child thread, not accumulated updates — each thread emits a running total repeatedly. Probe showed parent 26099 vs child 40661, i.e. parent < child, so the counters are disjoint and summing children does not double-count.
Two sweeps, so a row can never claim work forever
completedframe leaves "1 working" on screen indefinitely.unverifiable, never "exited". Codex resume replays no non-message items, so no event can ever arrive to settle a pre-restart child. Loss of contact is not evidence of exit.Carrier: a block variant, not a journal item kind
AgentJournalItemBodySchemais a closedz.discriminatedUnion('kind', …)enforced on every row. An unknown kind parses as MALFORMED — the corrupt-journal class that can hide the chat tab entirely. So the roster rides a newNativeChatBlockvariant instead: block types are explicitly admissible when unknown by design ("Renderers select blocks by type equality and skip what they cannot draw").The block is paired with a plain-text twin (
Kicked off 2 subagents). A client that knows the block drops the twin; one that doesn't renders the sentence. Verified: mobile matches onblock.type === 'tool-call'with silent fallthrough and no exhaustive switch, so it degrades to the sentence rather than breaking.The twin deliberately carries no live count. The journal row is durable and replayed on every reconnect. The desktop renderer reconciles the block's
workingtounverifiableoutside the live turn and drops the twin entirely — but a text-only client does neither, so a sentence saying2 workingwould keep asserting two running children after the writing process died, with nothing left that could re-check them. That is the collapsedocs/reference/ssh-execution-boundary.mdforbids: loss of contact reported as live state. The durable sentence therefore states only what outlives its process — that the group was spawned, plus whatever outcome had latched (Ran 3 subagents (1 failed)). Liveness lives in the structured block, where a client that can reconcile it also renders it.agents[].stateis deliberately an open string in the schema, matching the file's stated doctrine for tool/dispatch states, so a state a newer build writes cannot turn an older build's row malformed.Also
subAgentActivity/collabAgentToolCallare reclassified now that they render properly — feat(native-chat): model Codex MCP and web-search items instead of leaking opcodes #18763 deliberately kept them as gray rows so subagent work stayed visible until this landed.MessageRowmoves out ofNativeChatMessageListinto its own file to keep both under the max-lines budget without a disable.useNow(1000)in a leaf component rather than hand-rolled DOM ticking.Known cost
Mobile loses the mid-flight working count. Mobile drops the structured block and renders the twin, so with the live count gone from that sentence it now reads
Kicked off 3 subagentswhile the fan-out runs, rather than3 working. This is the accepted price of not lying: mobile has no reconciliation, so any liveness it displayed could not be withdrawn when contact was lost. It does not lose the terminal picture — the turn-end sweep rewrites the row toRan 3 subagents (2 unverifiable), and the case this protects is exactly the one where that sweep never runs.Mobile has not been exercised on a device. It consumes the new block variant and the shared tool-fold change is visible there. Degradation was verified statically, not on hardware.
The roster is not seeded from the journal. After in-process group eviction (cap 32) or a restart reusing the
outside-turnbucket, an N-child row can be rewritten down to one child. A correct fix needs journal-seeded roster restore; documented in the roster file header.Tests
src/main/codexLint and format clean on all 19 files. Verified against
e2b70a5eba6.🤖 Generated with Claude Code