[FEATURE] Context in Visual Code Extension's Usage Panel
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
Show context-window usage in the VS Code extension's usage panel
Summary
The VS Code extension's sidebar usage panel shows two progress bars — Session (5hr) and Weekly (7 day) — both rate-limit consumption. Please add a third bar for current context-window usage.
Proposed Solution
Motivation
Context usage is the number that changes what I do next: whether to start a new session, compact, or keep going. Rate-limit bars tell me about my quota over hours and days; context tells me about the conversation in front of me right now.
The CLI already surfaces all three. A custom statusLine script receives rate_limits.five_hour.used_percentage, rate_limits.seven_day.used_percentage, and context_window.used_percentage in the same payload, and renders them as three bars side by side. The extension's panel draws the first two and drops the third — even though the data is already flowing through the same channel.
So this isn't new plumbing. It's surfacing a field the status-line payload already carries, in a panel that already renders two of its three siblings.
Current behaviour
Sidebar panel:
Session (5hr) 99%
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
Resets in 2h
Weekly (7 day) 88%
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░
Resets in 2h
Requested behaviour
Session (5hr) 99%
Weekly (7 day) 88%
Context 78% ← added
315k / 400k
Colour thresholds matching the CLI convention would be a bonus (green → amber ~70% → red ~80%), since that's what users of custom status lines are already reading.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Motivation
Context usage is the number that changes what I do next: whether to start a new session, compact, or keep going. Rate-limit bars tell me about my quota over hours and days; context tells me about the conversation in front of me right now.
The CLI already surfaces all three. A custom statusLine script receives rate_limits.five_hour.used_percentage, rate_limits.seven_day.used_percentage, and context_window.used_percentage in the same payload, and renders them as three bars side by side. The extension's panel draws the first two and drops the third — even though the data is already flowing through the same channel.
So this isn't new plumbing. It's surfacing a field the status-line payload already carries, in a panel that already renders two of its three siblings.
Current behaviour
Sidebar panel:
Session (5hr) 99%
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
Resets in 2h
Weekly (7 day) 88%
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░
Resets in 2h
Requested behaviour
Session (5hr) 99%
Weekly (7 day) 88%
Context 78% ← added
315k / 400k
Colour thresholds matching the CLI convention would be a bonus (green → amber ~70% → red ~80%), since that's what users of custom status lines are already reading.
What I checked before filing
There is currently no supported way to do this myself:
- Claude Code
settings.json: the schema exposesstatusLineandsubagentStatusLine. Neither reaches the extension's panel, and there is no key for the sidebar. - Extension settings (
anthropic.claude-code-2.1.251): 16 contributed properties underclaudeCode.*. None relate to the usage panel, context, or tokens. - Extension commands: no registered command matching
usage,context,status, ortoken. - Extension views:
claudeVSCodeSidebar,claudeVSCodeSidebarSecondary,claudeVSCodeSessionsList— opaque containers with no contribution point for additional rows.
Workarounds, and why they fall short
claudeCode.useTerminal: truelaunches Claude in the terminal, where a customstatusLinerenders with all three bars. But it's all-or-nothing: it replaces the native chat UI entirely — session list, tool cards, clickable file links. Trading the whole editor experience for one number isn't a real option.- A
Stophook emittingsystemMessagecan print context usage into the native UI after each turn. It works, but it's after-the-fact rather than live, and it puts a line of chrome in the conversation instead of a bar in the panel.
Neither gets a live indicator into the place users already look.
Environment
- Extension:
anthropic.claude-code2.1.251 (win32-x64) - VS Code on Windows 11
- Using the native panel UI (not the integrated terminal)