feat(tui): list active session subagents in the sidebar - #46109
Open
iceteaSA wants to merge 1 commit into
Open
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Related PRs Found#4865: feat: add subagents sidebar with clickable navigation and parent keybind
#14043: feat(web): Show subagents under parent session, allow intuitive navigation between
#25712: feat(tui): show subagent cost rollup in sidebar and task history
|
Upstream PR anomalyco#4865 by @franlol, reimplemented against the current TUI. That PR targeted packages/opencode/src/cli/cmd/tui/routes/session/, which no longer exists. Its navigation and parent keybind have since landed upstream independently, so this adds only the missing sidebar section. It also diverges from that PR deliberately: it lists only in-flight subagents (pending and running) rather than every historical one, because real sessions accumulate hundreds of dispatched subagents and a complete list is unusable. Background dispatches complete the parent tool part immediately, so sidebar liveness is determined from child-session status.
iceteaSA
force-pushed
the
tui-subagents-sidebar
branch
from
August 29, 2026 08:06
a99799f to
c4d847f
Compare
1 task
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.
Issue for this PR
Closes #41249. Supersedes #4865 by @franlol (open).
Type of change
Credit
The feature and the original implementation are @franlol's in #4865 — subagents in the sidebar, click to navigate. This is that, rebased onto
dev, with one change that came out of using it: we ran an orchestration session with hundreds of subagents, and listing every one made the sidebar useless. So this lists only active subagents and dedupes by child session id, so a resumedtask_iddoesn't render twice. If @franlol revisits #4865, that filter is the part worth lifting. If theirs lands, I'll close this. @giovannic96 requested the same feature in #41249 after shipping it as an external plugin.Parent navigation and the return-to-parent keybind #4865 also added are already on
dev, so this is just the list.What does this PR do?
Adds a collapsible "Subagents" section to the sidebar showing the session's active subagents; select one to open that child session. The derive helper sits in
packages/coresincepackages/tuican't import opencode's private symbols.Liveness comes from the child session's status, not the parent's
tasktool-part status. That distinction is load-bearing: a background dispatch completes the parent's tool part the instant the child spawns, so the parent part readscompletedwhile the child runs for minutes. On my machine, of the last 300taskparts, 270 werecompletedand zero wererunning— including a subagent that was executing at the time. Filtering on the parent part yields an empty list forever and the section silently never renders.api.state.session.status(childID)is the correct signal, since idle sessions are absent from that map by design.How did you verify your code works?
packages/tui: 257 pass / 0 fail — covers derive, dedup, the active filter, and the background-completed-parent-with-busy-child case that the parent-status approach got wrongbun typecheckclean inpackages/tuiScreenshots / recordings
A "Subagents" list in the sidebar, active only, collapsible like the other lists.
Checklist