Show My Agent Tree
Render the subagent call tree for the current session and print it directly in
the assistant reply. This works identically in normal turns and in /btw
side-conversations and needs no VS Code host API.
Flow
Resolve the session id. Follow the
identify-session-idskill to obtain the current session id and note which source supplied it.Call the MCP tool. Invoke
mcp__drm-copilot__render_subagent_treewith:session_id: the id resolved in step 1.workspace_root: an explicit absolute path to the current workspace root (do not rely on the tool's default; pass it explicitly).
On success the tool returns
ok: true, asummarynaming the session id and resolved transcript path, and arendered_treestring.Print the tree. Output the
rendered_treevalue in the assistant reply inside a fenced code block, so the hierarchy is legible. Include thesummaryline above it for context.
Error Handling
- If the tool returns
ok: false, report thesummaryverbatim. An unknown session id names the searched directories; a malformed session id names the validation rule (^[0-9A-Za-z-]{8,64}$). - If
identify-session-idcannot resolve an id, report that and do not call the tool.