Repository navigation
fix(tui): show background subagent completion - #36530
Merged
Merged
Conversation
This was referenced Jul 19, 2026
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
Co-authored-by: Kit Langton <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Background subagents now leave a concise terminal-state notice in the parent V2 transcript. Success, failure, and cancellation are visible without relying on a later model response, while the full subagent result remains model-only.
How
packages/core/src/tool/subagent.tsattaches the existing syntheticdescriptionfield and metadata for the child ID, agent, and terminal state.packages/tui/src/routes/session/index.tsxrenders a one-line, theme-aware completion notice from that metadata.packages/core/test/tool-subagent.test.tsverifies the metadata survives durable synthetic-input admission.Scope
This does not change public schemas, Protocol or Server APIs, generated clients, database schemas, or subagent execution semantics. It uses the existing synthetic-message
descriptionand open metadata fields.Testing
cd packages/core && bun run test test/tool-subagent.test.tscd packages/core && bun typecheckcd packages/tui && bun run test test/cli/tui/session-rows.test.ts test/cli/tui/inline-tool-wrap-snapshot.test.tsxcd packages/tui && bun typecheckDemo
The deterministic recording launches the V2 TUI against the simulated OpenCode backend, starts a background Researcher subagent, and shows its completion returning to the parent transcript.
Watch the recording
Flow
Closes #35063