Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Context MeterNew to Visual Studio Code? Get it now.
Claude Context Meter

Claude Context Meter

Kexgev

|
6 installs
| (1) | Free
Instant token usage meter for Claude Code — ASCII progress bar, live file-watcher updates. Auto-detects 1M context for Opus/Sonnet 4.x+ (incl. Opus 4.8) and 200K for Haiku.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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.

Status bar

🤖 my-project ███░░ 156k/200k (78%) in:140k out:16k

The bar fills as your context fills. Color changes automatically:

  • Default — under warning threshold
  • Yellow — above warning (default 50%)
  • Red — above danger threshold (default 75%)

Tooltip (hover)

my-project

`claude-sonnet-4-6`  ·  🟡 warn · 78%

████████████████░░░░  78%
156,121 / 200,000 tokens

───────────────────────────────────
in: 140,000  ·  out: 16,000  ·  cr: 0  ·  cw: 121

Updated 9:42:15 PM

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 VSIX

  1. Download the latest .vsix from Releases
  2. In VS Code: Extensions → ··· → Install from VSIX

Or via terminal:

code --install-extension claude-context-meter-1.2.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.2.0.vsix

Requirements

  • VS Code 1.74+
  • Claude Code CLI

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

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft