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
With experimental.subagent_depth: 2, nested subagents (a subagent started by a subagent) never appear in the "N working" indicator at the top of the session view. They don't show up in the root session, and they don't show up in the child session that started them. The only way to reach one is to open the child session and click the subagent tool row in its transcript.
b.md: mode: all, allowed to call subagent c; prompt: "Call subagent c."
c.md: mode: subagent; prompt: "Reply with DONE." (make it slow enough to watch, e.g. ask it to run sleep 30 first)
Start a session with agent a.
While c is running, look at the "working" indicator in session a, then open session b and look at its indicator.
Expected
In session b, the indicator lists c (it is b's running subagent).
Ideally, session a also shows that work is running below b.
Actual
Session a lists only b.
Session b also lists only b (itself and its siblings), never c.
c is only reachable by opening b and clicking the tool row.
The sessions are linked correctly: in opencode.db, session_v2.parent_id of c is b, and of b is a. This is only a UI issue.
Cause (from the 2.1.4 desktop bundle)
The running-work state resolves the session to read from like this:
consttarget=session.get(id)?.parentID??id
Then it collects running subagent tool parts only from target's messages. That works for depth 1: in a child session, you see the parent's children, meaning yourself and your siblings. With depth 2 it breaks. Inside b, target becomes a, so b's own running subagents are never read. And a's messages never contain c.
Suggested fix
One of these would work:
Read the open session itself (target = id), so each session lists its own running subagents. Maybe keep siblings via the parent as a second source.
Better: collect running subagents from the whole family below the root, using the existing session.family(root), and show nested ones indented under their parent.
Option 2 also makes the root session show everything that is running, which helps when a delegating agent runs an orchestrator that runs workers.
Thanks for the detailed write-up and for tracking down the cause.
You're asking for the "N working" header to show nested subagents: a child session would list its own running subagents, and ideally the root would show everything running in the session tree, with nested items indented under their parent.
Your reading of the code is right. The header was built for one level of subagents: inside a child session it lists the parent's running work (the child and its siblings), and the root only scans its direct children. Nested subagents (experimental.subagent_depth > 1) are still experimental, and the header was never extended to cover them. So I've filed this as a feature request rather than a bug. Maintainers will consider it; both of your suggested approaches, especially collecting work across the whole family under the root, are useful input.
A plugin can't do this for now, because plugins can't change the Desktop session header.
Activity
opencode-agent commentedon Oct 23, 2026
Thanks for the detailed write-up and for tracking down the cause.
You're asking for the "N working" header to show nested subagents: a child session would list its own running subagents, and ideally the root would show everything running in the session tree, with nested items indented under their parent.
Your reading of the code is right. The header was built for one level of subagents: inside a child session it lists the parent's running work (the child and its siblings), and the root only scans its direct children. Nested subagents (
experimental.subagent_depth > 1) are still experimental, and the header was never extended to cover them. So I've filed this as a feature request rather than a bug. Maintainers will consider it; both of your suggested approaches, especially collecting work across the whole family under the root, are useful input.A plugin can't do this for now, because plugins can't change the Desktop session header.
Related issues:
experimental.subagent_depth> 1, the GUI navigation breadcrumb breaks into additional tabs. #48515: the breadcrumb breaking whensubagent_depth > 1FaheemOnHub commentedon Oct 27, 2026
i reproduced this and tested a local implementation with a->b->c/
The proposed behavior is:
before:
after:
would maintainers approve this approach for an implementation PR? @opencode-agent