github / github/copilot-cli

Show per-subagent AI credit usage breakdown in /usage

Open
#4,207 0 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:agents
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.