Feature request: Per-agent token usage reporting for subagents
Summary
When using multi-agent workflows via the Task tool, subagent token usage is rolled into the main instance's aggregate total. There's no way to see how many tokens each individual subagent consumed.
Use Case
In complex agent architectures with 10+ custom agents running on different models (opus, sonnet, haiku), it's important to understand:
- Which agents are consuming the most tokens per invocation
- Whether upgrading an agent's model (e.g., sonnet → opus) is justified by the quality/efficiency improvement
- Where to optimize — an agent that consistently uses high tokens might need a better prompt or narrower scope
Current Behavior
The main instance shows total session token usage. Subagents spawned via Task contribute to this total but their individual consumption is invisible.
Requested Behavior
Per-agent token usage visible somewhere — either:
- In the agent's output when it completes (alongside the result)
- In a session summary breakdown (e.g.,
/costor/tokenscommand showing per-agent stats) - In the status line while an agent is running
Even a simple line like [agent-name] completed — 12,450 input / 3,200 output tokens on return would be valuable.
Context
This becomes especially relevant when:
- Running agents on different model tiers (opus vs sonnet vs haiku) where cost varies significantly
- Spawning multiple parallel agents and wanting to understand relative efficiency
- Iterating on agent prompts and wanting to measure the impact on token usage
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗