VS Code panel: collapse subagent (Task) output — the UI already exists behind an internal flag
Problem
My workflow spawns several subagents per task. In the VS Code extension's chat panel, every subagent's messages render inline, fully expanded, interleaved with the main conversation. Heavy fan-out buries the actual conversation — the panel becomes unreadable exactly when the most work is happening.
What I found while looking for a workaround (inspecting the shipped webview bundle, v2.1.220)
- The panel already contains a finished collapsed-group UI: the
collapsibleToolCallsHeadercomponent and a message grouper inwebview/index.jsrender a group of messages as one clickable header with a count. It is gated behindwindow.IS_ANT, which is never set in public builds — so the feature appears to exist internally already. - The session model maintains a
subagentTasksmap (description, status, recent tools, token usage, duration) that currently has no render site — ready-made header/progress content. - Subagent messages arrive tagged with
parent_tool_use_id, so grouping them by run is already possible with the data on the wire.
Request
Render subagent output collapsed by default in the panel — one expandable block per Task run, headed by the subagent type and task description — or expose the existing grouping behind a setting. Given the pieces above, this looks much closer to a flag flip than a new feature.
A live "agents in flight" strip fed by the existing subagentTasks data (status / tokens / elapsed per running agent) would be a natural companion, since the data is already tracked.
Environment: VS Code extension (native panel, not terminal mode), macOS, Claude Code 2.1.220.