Agents panel: sort actively working agents to the top (active-first ordering)
Feature request
Sort the agents/teammates panel (the ← "for agents" view under the prompt) so actively working agents sit at the top, with idle/finished ones below, instead of fixed spawn order.
Why
When orchestrating 5-10 subagents/teammates for a long time, the panel fills with rows that finished or went idle hours ago (e.g. 20h 52m 50s), while the two or three agents currently streaming (↓ 151.3k tokens) sit at the bottom or mid-list. Scanning for "what is actually running right now" means reading every row. Sorting active-first (then by most recent activity) makes the live state legible at a glance.
Related: #79016 (finished teammates linger indefinitely) is about dismissing them; this is about ordering so the live ones are always visible even before dismissal.
What I tried
subagentStatusLine(https://code.claude.com/docs/en/statusline.md#subagent-status-lines) formats each row's text but cannot reorder or hide rows.- No documented sort/filter setting for the panel.
Proposal
- Default order: active (streaming / running tool) first, sorted by most recent activity; then idle, sorted by most recent activity; then exited.
- Optionally a setting, e.g.
agentsPanel.sort: "active-first" | "spawn-order", defaulting to active-first. - Bonus: expose
status/ "last activity" in thesubagentStatusLineJSON consistently so custom rows can render the same state the panel uses for ordering.
Environment
Claude Code 2.1.240, macOS (Darwin 25.5.0), terminal in VS Code, heavy use of named teammates (Agent tool with name) and background subagents.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗