Subscription usage meter
Know whether the current working session is about to hit your Claude plan limits — without leaving the dashboard.
What it does
- Ring in the ActivityBar footer tracks the rolling 5-hour window, the one that actually throttles a long session. Click it for a popover with the weekly window, any per-model sub-limits, the plan badge, and the time until each reset.
- Neutral under 75%, amber at 75–89%, red at 90%+ — while it's grey there is nothing to think about.
How it works
- New
claudeUsage.tsreadsGET https://api.anthropic.com/api/oauth/usage, the same endpoint the CLI's own/usagecommand calls, authenticated with the OAuth token already in~/.claude/.credentials.json. No API key, no extra config: if the Claude CLI is signed in, the meter works. - New route
GET /api/claude/usage;useClaudeUsage()refetches every 60s against a 60s server-side cache.
Deliberate limitations
- The endpoint is internal to the CLI and undocumented. It may change shape or disappear in a CLI update, so every failure path degrades to
{ available: false }and the widget hides itself instead of breaking the UI. - A 429 from that endpoint means the meter is being throttled, not that your plan ran out — that case serves the last good reading, marked stale, for up to 10 minutes.
- Only utilization percentages are exposed:
limit_dollars/used_dollarscome backnullon subscription plans, so there are no token or dollar counts to show. - The meter disappears while the OAuth token is expired, until the CLI refreshes it on next run.
Full Changelog: v1.10.0...v1.11.0
Full Changelog: v1.10.0...v1.11.0