Repository navigation
[Bug]: Live Codex subagent cards disappear after the parent turn finishes #16621
Description
Activity
Note
Grok responding on behalf of Julius.
Triage: confirmed on
main(checked at8ddf200, the same revision the report links).The timeline fold for a settled run hides subagent cards that come before the final answer, and it doesn't check whether the child is still running. The waiting footer comes from a separate source that counts exactly those still-running children, so the two disagree as soon as the launching turn settles.
Root cause
apps/web/src/components/chat/MessagesTimeline.logic.tstimelineEntryFoldRunId(L771-786) putssubagentevent entries into their launching run's fold group (L779-784).deriveUnsettledRunId(L754-768) stops treating the run as unsettled once it hascompletedAtand isn'trunning/starting/waiting. That happens about 8s in for this report, while the children keep running. After that, the run is no longer inunfoldedRunIds(L1249-1259).deriveTurnFolds(L870-1049) then hides every entry before the terminal assistant message (L976-995). The only exemptions aretimelineEntryIsPersistentResourceCard(L991) and notifications (L994). It never looks at the subagent item'sstatus. Thedelegate_taskcalls come before the "both children are running" reply, so both live cards land in the hidden set behind "Worked for 37s".
apps/web/src/session-logic.ts:PERSISTENT_RESOURCE_V2_ITEM_TYPES(L322-327) coversfork,thread_createdandsecret_requestonly.subagentis inSTANDALONE_V2_ITEM_TYPES(L313-320) but not in the persistent set, so the "linked resources can outlive their launching run" exemption doesn't apply to subagents.- Footer:
presentPendingBackgroundWork(packages/client-runtime/src/state/threadExecution.tsL332-379) builds "Waiting on 2 subagents and 1 command" fromderivePendingBackgroundWork(packages/shared/src/orchestrationV2PendingBackgroundWork.tsL223+). That function only returns work after the latest root run settles, and it keeps subagent turn items whose status is still active (pendingBackgroundTurnItems, L186-203). So the footer starts counting the children at the same moment the fold hides their cards. - The reappearance fits the same logic. The child-failure wake starts a new response with a notification row, which is never folded (L994). The retry card belongs to the new, unsettled run.
- The existing test
hides subagents in folded turns when they arrive before commentary(MessagesTimeline.logic.test.tsL3608) covers folding of a finished child. Nothing covers a child that is still running after its parent settles.
Suggested fix direction
In
deriveTurnFolds(andderiveSupersededAttemptFolds), keepsubagentevent entries visible while their item status is active (isOrchestrationV2WorkActive(item.status), the same check the footer uses). Finished children would still fold as they do today. Another option is to place live child cards next to the waiting footer instead of inside the folded turn. Add a regression test with a settledlatestRunand arunningapp-owned subagent before the terminal message. The mobilederiveThreadFeedRunFolds(apps/mobile/src/lib/threadActivity.ts) has similar fold logic and probably needs the same check.Related
- [Bug]: A background Claude subagent's thread and card stop updating when the parent's turn ends, and its work appears only after it finishes #16484 / fix(server): a background Claude subagent's work shows while its parent is idle #16486: a Claude background subagent card stops updating after the parent turn ends (server side, different cause).
- [Bug]: A background Claude subagent that wakes itself back up after an interim "completed" stays Completed in T3 until its final result #16610 / fix(server): a Claude subagent waiting on its own background work no longer shows as finished #16609: Claude subagent completed state.
- [Bug]: Thread details side-tabs (Subagents/Lineage/Automations/Background Tasks) disappear once rows populate #15304: thread side-tabs disappearing.
- fix(web): anchor a continued sub-agent's fold with the turn that started it #16245 and fix(clients): a steer splits the settled work fold #15421 (open) change
deriveTurnFoldsanchoring and steer splitting, but neither keeps live subagent cards visible. No open PR fixes this one.
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
on Oct 6, 2026
Before submitting
Area
apps/web
Summary
In the T3 Code desktop conversation timeline, two app-owned Codex children launched by a Claude parent were absent from the visible conversation after the parent finished its launching turn. The footer still reported two pending subagents. The user reports that the cards initially appeared and then disappeared. A later screenshot shows a failed child and a running retry after a child failure resumed the parent. This prevents the user from monitoring individual children while the parent waits.
Steps to reproduce
These are the known incident conditions, not a deterministic reproduction executed by this investigator. Use the installed baseline under Runtime or environment.
gpt-6.1-solwithreasoningEffort=high. In the observed conversation, the parent calledmcp__t3-code__delegate_tasktwice. The task subject and private local note are omitted because they are unnecessary to describe the visibility failure. A generic task substitute has not been tested.Worked for 37sand the parent's confirmation that both Codex children are running are visible. The footer saysWaiting on 2 subagents and 1 command, but the child activity cards are absent from that visible response.One incident is supported by two supplied screenshots and a read-only recovery of its stored state. No fresh UI attempt, fold-expansion test, navigation test, or reload test was run. The exact interaction or state update that first hid the cards is unknown.
Expected behavior
Live app-owned child tasks remain visible and inspectable in the parent conversation while they are running or waiting, including after the launching parent turn finishes. Folding settled parent work must not hide the only per-child activity cards while the footer still counts those children as pending. Each card should continue to reflect its own lifecycle, so completion of the parent turn does not make active children appear to have vanished.
Actual behavior
The user reports seeing the Codex children initially and then losing their cards. The first supplied screenshot shows the parent waiting on two subagents and one command with no child cards visible in that response. The second supplied screenshot shows a failed Codex child and a running retry in the later response. The failed card displays
stream disconnected before completion: stream closed before response.completed.The recovered store confirms that these were registered app-owned Codex children, rather than only an assistant claim about delegation. Both original children belong to a parent run that completed while the children continued in the background. One subsequently failed and produced a continuation that launched the retry. The disconnect is reported as part of that sequence; this report does not establish that it caused the visibility problem. Read-only state inspection confirmed child records and model options. It did not reproduce the UI failure or prove provider-process liveness.
Evidence
Worked for 37s, the parent confirmation, andWaiting on 2 subagents and 1 command, with no child cards in that response. Supplied Screenshot B is the later view with the failed child and running retry. The user explicitly reports initial appearance, disappearance, and subsequent reappearance. Original screenshots are not attached publicly because they contain unrelated private conversation content; the relevant UI text and state are transcribed here.Read-only state recovery adds the following observed supporting evidence. Task names, identifiers, paths, and absolute timestamps are omitted. Times are relative to the first child's stored start and are approximate.
origin=app_owned,provider=codex, andstatus=running.status=failedwith the same stream-disconnect text shown in Screenshot B. A new parent continuation starts.origin=app_ownedandstatus=running.Each original child and the retry has a persisted child-thread model selection of
instanceId=codex,model=gpt-6.1-sol, andoptions=[{id: reasoningEffort, value: high}].Supporting source inspection, not proof of the installed cause: current timeline folding logic groups subagent events by their launching run, derives the unsettled run from the parent lifecycle, and includes pre-answer subagent entries in a completed-turn fold. The persistent-resource exemption in
apps/web/src/session-logic.ts:322excludes subagents. This makes settled-run folding a plausible explanation for the supplied sequence. The inspected source revision has not been matched to the installed bundle, and no implementation change is prescribed.Restoration check
Repeat the known cross-provider launch with two app-owned Codex children and capture the missing initial transition. After the launching parent turn finishes, confirm that both children remain visible and inspectable while the waiting footer counts them. Confirm the same behavior through a later parent continuation and a child retry. Each card must reflect its own running, failed, or completed state. As a control, ordinary settled parent command and reasoning entries should still be eligible for folding. Expanding all completed turns by default would not independently establish that live child visibility follows the child's own lifecycle.
Runtime or environment
Installed desktop application version, read from the running application's bundle:
0.0.46-nightly.20261006.2735.The incident occurred in the T3 Code Nightly desktop app on macOS 27.0. The parent used
claude-opus-5-5, high effort, with the 1M context option and full access. The delegated children used the default Codex instance and model options described above. The Codex CLI found on the serving host reported0.160.1; the worker's exact executable has not been independently matched. Thread state was recovered from the serving host's active v2 SQLite store with read-only access. The installed application commit is unknown.Impact
Minor bug or occasional failure. The supplied incident loses per-child monitoring during a legitimate cross-provider background-task workflow. It does not establish that task execution stops, that data is lost, or that every delegation is affected.
Workaround
No verified workaround. A later parent continuation made a failed child and its retry visible in the supplied incident. Manually expanding the completed
Worked forrow may expose folded cards, but that action has not been tested and is not claimed to restore persistent live monitoring.Triage assessment