Show per-subagent AI credit usage breakdown in /usage
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với lệnh /usage và cơ chế ghi nhận credit của session hiện có được mô tả trong issue. Theo dõi cách mức sử dụng của main-agent, subagent, custom-agent, model và background-operation được ghi lại, sau đó xác định bảng phân rã và tổng được hiển thị cho các dạng lệnh được đề xuất. Hoàn thành khi /usage có thể hiển thị chi tiết theo từng lần gọi mà vẫn duy trì tổng tích lũy của session.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100