Add input token breakdown to Token Usage Metadata
- Dominant language
- Go
- Stars
- 39
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
### Description
As discovered in #119, the Token Usage Metadata display currently shows zeros even when significant tokens are being consumed. Investigation revealed that extra input tokens come from:
• Coder's MCP tool injection - adds tokens not reflected in metadata
• For CLI or IDE Agents - includes a long system prompt
### Problem
• Simple messages like "Hello from Zed" consume ~6000+ input tokens in Text mode (No System prompt)
• Agent mode consumes ~11000+ input tokens (System prompt)
• Users cannot see where these tokens originate since metadata shows all zeros
### Proposed Solution
Capture and display a breakdown of input token sources in the Token Usage Metadata, including:
• Prompt tokens (user message)
• System prompt tokens
• Injected tokens (MCP tools, editor context, etc.)
### Acceptance Criteria:
• Token Usage Metadata accurately reflects actual token consumption
• Users can see the breakdown of token sources (prompt vs system vs injected)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.