Claude Code Rate Limit Status Bar
Know how much Claude you have left before you hit the wall. Your 5-hour and 7-day usage windows, as real coloured progress bars in the VS Code status bar, with the countdown to each reset.
Unofficial extension. Not affiliated with, endorsed by, or supported by Anthropic. "Claude" is a trademark of Anthropic, PBC.

The problem
Claude's limits are two rolling windows, and you only find out you have exhausted one when a request gets refused, usually in the middle of something. The CLI statusline can show a number, but only inside the terminal, only while Claude Code is in the foreground, and never in the editor where you actually work.
What you get
Two lines, always visible, updating on their own:
5h ▁████▌ 12% 4h52m 7d ▁███████▌ 75% 1d03h
For each window: the share consumed, a bar that fills as you burn it, and how long until it resets.
Bars are drawn with an embedded icon font, so they hold their shape whatever your font settings do to ASCII blocks. Each line carries its own colour, which is enough to read at a glance: green below 50 %, yellow below 75 %, orange below 90 %, red at 90 % and above. Data older than staleSeconds turns grey, so a stale number never passes for a fresh one, and a failing call tints the bars orange or red. There is no separate status icon: the bars already carry that, and clicking anywhere on a line forces a refresh. Both lines stay on screen even with no data at all, as empty grey bars reading --, so there is always something to click.
Where the numbers come from
The primary source is the OAuth usage endpoint https://api.anthropic.com/api/oauth/usage, called with the token Claude Code already stores in ~/.claude/.credentials.json. There is no separate API key to create, and it works the same whether you drive Claude from the CLI or from the official extension. If that token has expired, it is renewed against https://console.anthropic.com/v1/oauth/token with the refresh token from the same file.
Calls are deliberately sparse, because rate-limiting your rate-limit display would be absurd:
- at most one call per 55 s, and no more often than
apiIntervalSeconds (default 3 min)
- results are shared between VS Code windows through a cache file in your temp directory, with a lock so ten open windows still make one call
- HTTP 429 triggers exponential backoff, 60 s doubling up to 10 min, with jitter so windows do not retry in lockstep
If the endpoint is unreachable, the extension falls back to the CLI statusline cache at %TEMP%\cs-rate-cache.json, and the tooltip tells you it did.
Privacy
The credentials file is read locally, and the token is sent only to api.anthropic.com and console.anthropic.com, exactly the endpoints Claude Code itself talks to. Nothing is transmitted anywhere else. No telemetry, no analytics, no third parties.
Want zero network access? Set claudeRate.apiFallback to false and the extension runs on the CLI cache alone.
Settings
| Setting |
Default |
Description |
claudeRate.apiIntervalSeconds |
180 |
Delay between two cycles, in seconds (minimum 30). Higher means less risk of 429 |
claudeRate.jitterMinSeconds |
0 |
Lower bound of the random delay added to each cycle |
claudeRate.jitterMaxSeconds |
25 |
Upper bound of that random delay. Both at 0 removes it entirely |
claudeRate.idleMultiplier |
3 |
Interval multiplier while the window has no focus. 1 keeps one cadence everywhere |
claudeRate.staleSeconds |
300 |
Age past which the bars are greyed out, in seconds |
claudeRate.barWidth |
8 |
Bar width, in cells (clamped to 4-20) |
claudeRate.apiFallback |
true |
Query the usage API as the primary source. false means CLI cache only |
claudeRate.cachePath |
"" |
Path to cs-rate-cache.json (empty means %TEMP%) |
Everything hangs off a single randomized loop: sync, then render, every apiIntervalSeconds plus a delay re-rolled between jitterMinSeconds and jitterMaxSeconds. Nothing is drawn between two cycles, and a cycle that finds the same values as the previous one draws nothing at all. Regaining focus runs a cycle, which hits the network only if the data is stale.
Commands
| Command |
What it does |
Claude Rate: Refresh |
Clears the cooldown and fetches immediately |
Troubleshooting
If the bars render as empty boxes, restart VS Code. The icon font is loaded at startup, and a freshly installed extension does not get it until then.
Grey bars reading -- with an orange tint mean no usable credentials were found at ~/.claude/.credentials.json (or in the keychain on macOS). Sign in with Claude Code once and the numbers appear.
Orange bars mean you hit HTTP 429 and the extension is backing off. The tooltip shows when it will try again; clicking retries immediately, which is usually not what you want.
If the numbers look frozen while VS Code sits in the background, that is the idleMultiplier at work: cycles are spaced out, not stopped. Set it to 1 for a single cadence, or hover to check the source and the next refresh time.
License
MIT