Claude Code Token Meter
Live Claude Code plan limits in your VS Code status bar: the 5-hour session, weekly and per-model limits, whether you'll run out before they reset, how full the context window is, and what the tokens would cost on the API.

Features
- Session and weekly limits. The 5-hour session and the weekly limit, with reset times, read straight from Claude's usage API.
- Per-model weekly limits. When your plan has an Opus or Sonnet weekly cap, it appears too, and the weekly slot shows whichever weekly limit is closest to blocking you.
- Forecasts. The tooltip says whether, at your current speed, you'll run out before a limit resets, and when. For the weekly limit it also says how much you can use per day ("To last until it resets, keep to about 13% a day").
- Context window. Tokens in the current conversation against the model's window (200k or 1M), so you can see compaction coming.
- Session tokens and cost. Input, output, cache read and cache write for the current session, subagents included, with what they would cost at Anthropic's API prices.
- Usage details view. Every limit, the current session, and the last 7 days by day, model and project. Each limit's bar shows what you've used so far, what you'll likely have used by reset time, and how much of the time has passed.
- Color warnings. Yellow at 80%, red at 95% (both configurable), and the server's own warning level when it's higher. As a background, as colored text, or off.
- Bar styles. Five meter styles with a live preview picker.
- Notifications. When a limit reaches 90%, and when your session limit resets after you ran it down. Optional: a warning when, at your current speed, you'll run out of the session limit early.
- Extra usage. Credits spent against your monthly extra-usage limit, when enabled.
- No setup, no hooks. Works on Windows, macOS and Linux. Nothing is added to Claude Code's settings.
Status bar
⚡ 5h ████▒▒▒░ 56% ↺6:05 PM wk ████▒░░░ 54% ≋ 353k · 35%
Each bar shows what you've used so far (solid cells) and what you'll likely have used by reset time if you keep going at the same speed (shaded cells). If the shaded cells reach the end of the bar, you'll run out before it resets.
| Item |
Shows |
Click |
Session (5h) |
5-hour session use, the forecast, and the time it resets |
Refresh |
Weekly (wk) |
Weekly use and the forecast, tagged wk Opus etc. when a per-model limit is the highest |
Refresh |
| Context |
Tokens in the current conversation and % of the context window |
Usage details |
A ⚠ icon means the last refresh failed or the numbers are old (they're also dimmed); hover for the reason.
Bar styles: run Claude Token Meter: Choose Bar Style… to preview them live in the status bar.
| Style |
Looks like |
blocks (default) |
████▒▒▒░ 56% |
steps |
▆▆▆▆▃▃▃▁ 56% |
dots |
⣿⣿⣿⣿⣤⣤⣤⣀ 56% |
slim |
▰▰▰▰▱▱▱▱ 56% (no forecast) |
pie |
◑ 56% |
Tooltip:
█ used so far · ▒ likely used by reset time, if you keep this speed
Current session: 48% used
Resets 6:05 PM (in 3h 53m)
⚠ At your current speed (about 22% an hour), you'll run out around 4:25 PM, 1h 40m before it resets
Weekly (all models): 53% used
Resets Mon 2:45 PM (in 1d 3h)
At your average speed so far (about 8.9% a day), you'll be at about 62% when it resets
To last until it resets, keep to about 46% a day
Accuracy
- Plan percentages come from the same usage endpoint Claude Code's
/usage uses, refreshed about every 2 minutes while Claude is working and every 5 minutes otherwise. Several open VS Code windows share one refresh. When Claude Code has fetched usage itself more recently, its copy is used instead, and the meter backs off when the endpoint rate-limits.
- A window whose reset time has passed shows 0% right away, and the meter refreshes as soon as it resets.
- Token counts come from Claude Code's session transcripts. Claude Code writes one line per content block, each repeating the reply's usage, so each reply is counted once. Summing the lines instead overcounts about 3x.
- Context is the full prompt of the latest reply: uncached input plus cache reads and writes.
- Costs use Anthropic's published API prices per model, including 5-minute vs 1-hour cache writes, discounted cache reads, fast mode and web searches. Subscription plans aren't billed per token; the figure shows what the usage is worth at API rates.
Settings
| Setting |
Default |
|
claudeTokenMeter.refreshInterval |
300 |
Seconds between refreshes while Claude is idle |
claudeTokenMeter.warningThreshold |
80 |
Percent that turns a meter yellow |
claudeTokenMeter.criticalThreshold |
95 |
Percent that turns a meter red |
claudeTokenMeter.notifyAt |
90 |
Notify once per window at this percent (0 = off) |
claudeTokenMeter.notifyOnReset |
true |
Notify when a session limit you ran down resets |
claudeTokenMeter.notifyOnPace |
false |
Warn when, at your current speed, you'll run out of the session limit early |
claudeTokenMeter.showWeekly |
true |
Show the weekly meter |
claudeTokenMeter.showContext |
true |
Show the context meter |
claudeTokenMeter.showCost |
false |
Add the session's API-equivalent cost to the context meter |
claudeTokenMeter.barStyle |
blocks |
blocks, steps, dots, slim or pie |
claudeTokenMeter.barWidth |
8 |
Cells per meter (0 = numbers only) |
claudeTokenMeter.showPace |
true |
Shade what you'll likely use by reset time |
claudeTokenMeter.colorMode |
background |
Warnings as a background, as text color, or off |
claudeTokenMeter.contextWindow |
auto |
auto, 200k or 1m |
claudeTokenMeter.includeSubagents |
true |
Count subagent replies in session totals |
claudeTokenMeter.sessionScope |
workspace |
Follow this workspace's latest session, or the latest anywhere |
Commands
- Claude Token Meter: Refresh
- Claude Token Meter: Show Usage Details
- Claude Token Meter: Choose Bar Style…
- Claude Token Meter: Open Manual
- Claude Token Meter: Remove Legacy Stop Hook
Requirements
- Claude Code, signed in with a Claude subscription (Pro, Max, Team or Enterprise) for plan limits. With an API key there are no plan limits; the context and cost meters still work.
- Windows, macOS or Linux.
How it works
- Plan limits: the extension reads your Claude Code sign-in (
~/.claude/.credentials.json, or the macOS Keychain) and calls https://api.anthropic.com/api/oauth/usage, the endpoint behind Claude Code's /usage. The token is never stored or sent anywhere else. The extension never refreshes or changes your sign-in; if it has expired, open Claude Code and it will renew it.
- Tokens and context: read from Claude Code's transcripts in
~/.claude/projects/, only the lines added since the last read.
- Honors
CLAUDE_CONFIG_DIR.
Upgrading from 0.3.0 or earlier
Earlier versions added a Stop hook (~/.claude/hooks/stop-usage.ps1) that ran PowerShell after every Claude reply. It isn't needed any more. On first start the extension offers to remove it; you can also run Claude Token Meter: Remove Legacy Stop Hook later. settings.json is backed up to settings.json.token-meter-backup first. If you keep the hook, the extension fixes its percent bug, which showed 1% as 100%.
Repository
github.com/som3669/Claude-Code-Token-Meter
License
Proprietary. All rights reserved. See LICENSE.
| |