github / github/copilot-cli

Show per-subagent AI credit usage breakdown in /usage

オープン
#4,207 コメント 0 件 リアクション 8 件 担当者 0 名 GitHub で見る
area:agents
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

/usage コマンドと、issue に記載されている既存のセッション クレジットの集計から始めます。main-agent、subagent、custom-agent、model、background-operation の使用量がどのように記録されるかを追跡し、そのうえで提案されているコマンド形式に対して表示する内訳と合計を定義します。/usage で呼び出しごとの詳細を表示しつつ、セッションの累積合計を維持できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。