Show per-subagent AI credit usage breakdown in /usage
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
Describe the feature or problem you'd like to solve
Copilot CLI displays cumulative AI-credit usage for the session, including 4 usage by the main agent, subagents, and background operations. However, it 5 does not show how those credits are distributed among individual agent 6 invocations. 7 8 This makes it difficult to identify expensive agents, compare custom-agent 9 models, and optimize multi-agent workflows.
Proposed solution
Extend /usage with an optional itemized breakdown showing:
- Main-agent usage
- Each subagent invocation
- Custom-agent name
- Model used
- AI credits consumed
- Background operations such as context compaction
- Total session usage
Example prompts or workflows
Use case
When a parent agent delegates investigation, implementation, review, and
testing to several subagents, users need to understand which invocation or
configured model accounts for most of the session cost.
Example
Main agent 4.20 AIC
Explore #1 — architecture 1.15 AIC
ios-implementer #1 7.80 AIC
Task #1 — tests 0.65 AIC
Context compaction 0.30 AIC
--------------------------------------------
Session total 14.10 AIC
Possible commands:
/usage
/usage --by-agent
/usage --detailed
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the /usage command and the existing session credit accounting described in the issue. Trace how main-agent, subagent, custom-agent, model, and background-operation usage are recorded, then define the displayed breakdown and totals for the proposed command forms. Done means /usage can show per-invocation details while preserving the cumulative session total.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100