github / github/copilot-cli

Show per-subagent AI credit usage breakdown in /usage

Offen
#4,207 0 Kommentare 8 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:agents
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### 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_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem Befehl /usage und der im Issue beschriebenen bestehenden Abrechnung der Sitzungsguthaben. Verfolge, wie die Nutzung von main-agent, subagent, custom-agent, model und background-operation erfasst wird, und definiere dann die angezeigte Aufschlüsselung und die Summen für die vorgeschlagenen Befehlsformen. Erledigt ist die Aufgabe, wenn /usage Details pro Aufruf anzeigen kann und dabei die kumulative Sitzungssumme erhalten bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.