Expose subagent token usage in status line
Problem
The status line's token count (total_input_tokens / total_output_tokens) only tracks the main conversation. Subagent tokens (Agent tool) are invisible — they run in isolated contexts with no metrics surfaced to the status line JSON.
On Max plans, /cost only confirms "using your subscription" — no token or dollar breakdown.
Proposed solution
Add subagent token fields to the status line JSON:
{
"context_window": {
"total_input_tokens": 10000,
"total_output_tokens": 2000,
"subagent_total_input_tokens": 45000,
"subagent_total_output_tokens": 8000
}
}
Enabling status lines like:
project (main) | Opus 4.6 | 3% ctx | 12k + 53k tok
Where 12k = main conversation, 53k = cumulative subagent tokens.
The data already exists in ~/.claude/projects/{project}/{sessionId}/subagents/agent-{agentId}.jsonl — it just needs aggregation into the status line schema.
---
Drafted by Claude Code (Opus 4.6), reviewed by author.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗