You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tui): show background subagent failures in V2 #35063
In the V2 TUI, a backgrounded subagent failure is not reliably shown as a visible parent-session transcript update.
Current flow:
packages/core/src/tool/subagent.ts waits for the child job via runtime.job.wait(...).
On failure, it calls injectCompletion(...) with state: "error", which publishes a synthetic parent-session message through runtime.session.synthetic(...).
session.synthetic publishes session.next.synthetic and resumes the parent session.
packages/tui/src/context/data.tsx stores the synthetic message.
packages/tui/src/routes/session/rows.ts only appends/renders synthetic rows when event.data.description?.trim() is present.
The subagent completion injection sets text, but does not set description, so the explicit failure notice is hidden from the visible transcript.
The notification plugin may still produce attention for child-session errors, and the resumed parent model may later generate visible text, but the direct "background subagent failed" notice is not guaranteed to appear in the TUI.
Expected
When a backgrounded subagent fails, the parent session TUI should visibly update with a clear failure/completion notice, without relying on a subsequent model turn.
Possible Fix
Either:
include a non-empty description when SubagentTool.injectCompletion(...) emits the synthetic completion/failure message, or
adjust the TUI synthetic-row filtering/rendering so these subagent completion messages are intentionally visible.
Notes
This is V2-specific. V1 has related background task injection behavior, but this issue is for the current V2 TUI path.
Fixed by #36530 (5414697bd1). Background subagent synthetic messages now include description, so completion and failure notices pass the TUI row visibility filter.
Activity
kitlangton commentedon Jul 29, 2026
Fixed by #36530 (
5414697bd1). Background subagent synthetic messages now includedescription, so completion and failure notices pass the TUI row visibility filter.