[FEATURE] Surface detailed session usage stats in VS Code / Cursor extension
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Problem Statement
When using the Claude Code extension in VS Code / Cursor, the /usage command only opens an "Account & Usage" popup showing my auth method, email, organization, and a link to manage usage on claude.ai. It does not show the per-session breakdown of tokens, cost, cache reads/writes, or lines changed.
This means I have no in-IDE visibility into:
- How much a given session is costing me
- Token consumption broken down per model
- Cache hit/miss ratios (useful for understanding prompt efficiency)
- Wall vs. API duration
To get this information, I have to leave the extension UI and run claude in a terminal, which fragments the workflow.
Proposed Solution
Bring the CLI's detailed session usage output into the VS Code / Cursor extension. Ideally, running /usage (or /cost / /status) inside the extension would show the same breakdown that the terminal CLI shows, for example:
Session
Total cost: $0.0322
Total duration (API): 2s
Total duration (wall): 21s
Total code changes: 0 lines added, 0 lines removed
Usage by model:
claude-opus-4-8: 1.7k input, 31 output, 21.3k cache read, 2.0k cache write ($0.0322)
This could be rendered either as a message in the chat panel (matching CLI behavior) or as a dedicated "Usage" panel in the extension sidebar.
Alternative Solutions
- Running claude in VS Code's integrated terminal instead of using the native extension — this works but loses the inline diff UI and conversation history the extension provides.
- Running both side-by-side (extension for editing, a terminal session for stats), clunky and duplicates work.
Priority
High - Significant impact on productivity
Feature Category
Interactive mode (TUI)
Use Case Example
- I start a Claude Code session in the VS Code extension to refactor a module.
- After ~30 minutes of back-and-forth, I want to check how much the session has cost and whether prompt caching is working well.
- I run /usage in the extension — but I only get the "Account & Usage" popup pointing me to claude.ai.
- With this feature, /usage would instead show me the per-session token/cost/cache breakdown directly in the extension, the same way the terminal CLI does.
- This would save me from having to spin up a separate claude terminal session just to check cost and cache efficiency, and would let me tune my prompts (e.g., to improve cache reuse) without leaving the IDE.
Additional Context
**Screenshot:
<img width="749" height="452" alt="Image" src="https://github.com/user-attachments/assets/535896f6-82d2-4205-86c3-78cc177a5366" />
**
Extension /usage output: shows only "Account & Usage" popup with auth method, email, organization, and "Usage tracking is only available for Claude AI subscribers" — (attach your first screenshot)
Environment:
- Editor: VS Code and Cursor (both affected)
- Extension: Claude Code
- Billing: Anthropic API (pay-as-you-go)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗