Claude Context Meter
A minimal VS Code extension that shows your Claude Code token usage as an ASCII progress bar directly in the status bar — updates instantly via file watcher, zero polling. Also shows live cost and burn rate per session.
Status bar
🤖 my-project ███░░ 156k/200k (78%) ~$1.20 🔥2.1k/m
The bar fills as your context fills. After the percentage it shows the running session cost (~$1.20) and the recent burn rate (🔥2.1k/m = ~2,100 tokens/min). Color changes automatically:
- Default — under warning threshold
- Yellow — above warning (default 50%)
- Red — above danger threshold (default 75%)
You also get a warning/critical notification the first time a session crosses each threshold.
Click actions
Click a meter to open a quick menu for that session:
- Hide — dismiss this meter until the session has new activity
- Open transcript — open the session's
.jsonl log
- Copy stats — copy this session's stats as a markdown row
my-project
`claude-sonnet-4-6` · 🟡 warn · 78%
████████████████░░░░ 78%
156,121 / 200,000 tokens
───────────────────────────────────
in: 140,000 · out: 16,000 · cr: 0 · cw: 121
🔥 recent: ~2.1k/min · avg: ~2.1k/min
⏳ ~21 min to full
💰 cost: $1.20 (in: $0.42 · out: $0.24)
Updated 9:42:15 PM
Commands
Available from the Command Palette (Ctrl/Cmd+Shift+P):
- Claude Context Meter: Copy Context Stats — copy a markdown table of all active sessions to the clipboard
How it works
Claude Code writes session logs as .jsonl files under ~/.claude/projects/. This extension watches that directory with VS Code's file system watcher — no polling interval, no delay. The moment Claude writes a response, the meter updates.
Token limit is auto-detected from the model name:
| Model |
Context |
| Opus 4.6/4.7/4.8, Sonnet 4.5/4.6/4.7, and any future Opus/Sonnet |
1M tokens |
| All Haiku models (4.5, 3.5, 3) |
200k tokens |
| Legacy Claude 3 / 3.5 Sonnet & Opus |
200k tokens |
New Claude releases default to 1M unless they are Haiku — no extension update required.
Unrecognized non-Claude models fall back to the contextLimit setting.
Install
From the Marketplace (recommended)
Install Claude Context Meter from the VS Code Marketplace, or search "Claude Context Meter" in the Extensions panel (Ctrl/Cmd+Shift+X). Updates arrive automatically.
From VSIX
- Download the latest
.vsix from Releases
- In VS Code:
Extensions → ··· → Install from VSIX
Or via terminal:
code --install-extension claude-context-meter-1.4.0.vsix
Build from source
git clone https://github.com/kexgev/claude-context-meter.git
cd claude-context-meter
npm install
npx vsce package --allow-missing-repository
code --install-extension claude-context-meter-1.4.0.vsix
Requirements
Settings
| Setting |
Default |
Description |
claudeContextMeter.contextLimit |
200000 |
Fallback token limit when model is not auto-detected |
claudeContextMeter.idleTimeout |
180 |
Seconds of inactivity before hiding a session |
claudeContextMeter.warningThreshold |
50 |
% at which the bar turns yellow |
claudeContextMeter.dangerThreshold |
75 |
% at which the bar turns red |
claudeContextMeter.compactMode |
false |
Abbreviate long project names (e.g. my-cool-project → MCP) |
claudeContextMeter.showEmoji |
true |
Show project emoji prefix |
claudeContextMeter.autoColor |
true |
Auto-assign a unique pastel color per project |
claudeContextMeter.shortNames |
{} |
Custom name overrides e.g. { "my-project": "MP" } |
License
MIT