VS Code with Claude Code workflow: the rate-limit gap nobody else covers
Every VS Code + Claude Code workflow guide walks through the Spark icon, @-mentions, plan vs auto-accept, /worktree and the diff reviewer. None of them cover the moment the agent dies mid-refactor because you blew through the rolling 5-hour window. The Anthropic extension does have a /usage slash command, but it is a one-shot dump inside the chat panel. claude-meter pins the same number into your macOS menu bar on a 60-second tick so the wall stops sneaking up on you. Same endpoint, same data, different surface.
Direct answer (verified 2026-05-05)
Type /usage inside the Anthropic VS Code Claude Code extension for a one-shot plan-quota dump (it sits in the same / command menu as file attachments, model switching, and extended thinking, per Anthropic's VS Code extension docs). For a live, always-visible readout that does not require leaving the editor, install claude-meter (brew install --cask m13v/tap/claude-meter). It calls the same /api/organizations/{org}/usage endpoint on a 60-second alarm and pins the rolling 5-hour, 7-day, and extra-usage rows to your macOS menu bar so the wall stops surprising you. Numbers match exactly because the data source is identical.
The gap every VS Code + Claude Code guide skips
Open any current article on running Claude Code inside VS Code, including Anthropic's own docs page, eesel's setup guide, DataCamp's tutorial, ClaudeLog, sitepoint, builder.io, and claudefa.st. Compare the section headings: install the extension, sign in, send a prompt, review changes, switch permission modes, @-mention files, attach images, run multiple sessions in tabs, use worktrees, swap to terminal mode, configure MCP servers, integrate git. Every one of those is real and useful.
What is missing: the moment Claude Code stops responding, posts “message limit reached” into the panel, and your half-done refactor sits there in the diff view waiting for a reset timer you cannot see. The Anthropic docs page mentions /usage exactly once, in a list of available slash commands. None of the third-party guides mention it at all. None of them mention the rolling 5-hour window, the 7-day weekly quota, or the extra-usage metered ledger that activates when you opt in.
That is the gap. The workflow people actually live with on Pro and Max is: write, prompt, accept, write, prompt, accept, dead. The dead moment is the one nobody covers.
/usage in VS Code vs claude-meter in the menu bar
They are not rivals. They run against the same endpoint and surface the same fact. The difference is whether the fact is a slash command you remember to run, or a number you cannot help but see.
| Feature | /usage (slash command) | claude-meter (menu bar) |
|---|---|---|
| Where the number lives | Inside the Claude Code conversation panel after you type /usage. Scrolls away as soon as you send the next prompt. | macOS menu bar (always visible) and Chrome/Arc/Brave/Edge toolbar badge (always visible). Persists across VS Code restarts. |
| Refresh model | On-demand only. You have to remember to type /usage. There is no push notification when you cross 80% on the 5-hour window. | Polls every 60 seconds (extension/background.js POLL_MINUTES = 1). Toolbar badge color shifts at 80% (orange) and 100% (red). |
| Data source | claude.ai/api/organizations/{org}/usage (the same endpoint claude.ai/settings/usage renders). | claude.ai/api/organizations/{org}/usage. Identical endpoint, identical numbers. Plus /overage_spend_limit and /subscription_details for the metered ledger and next-charge date. |
| Surfaces the weekly + extra-usage rows together | Yes for the rolling buckets if you are on a current Claude Code build; the dump is verbose and you have to parse it visually. | Compact six-row table in the menu bar dropdown: 5-hour, 7-day all, 7-day Sonnet, 7-day Opus, Extra usage, Next charge. One glance. |
| Visible while VS Code is closed | No. Requires an open Claude Code conversation. | Yes. Menu bar app and browser extension run independently of VS Code's lifecycle. |
| Visible across multiple VS Code windows | Per-window. Each Claude Code panel has its own conversation; /usage runs against your account either way. | Single menu bar item reflects account-wide quota across every VS Code window, every Cursor instance, and every claude.ai web tab. |
| Token spend per session | No. /usage is plan quota, not token cost. | No, by design. Token cost lives in ccusage (npx ccusage). claude-meter and ccusage answer different questions. |
| Cost | Bundled with the Claude Code extension. Free with a Pro/Max plan. | Free. MIT licensed. brew install --cask m13v/tap/claude-meter. |
The five lines that do the work
The data path is short enough to read. The browser extension declares a base URL, a localhost bridge URL, and a poll interval, then the alarm handler calls fetchSnapshots() which hits the same /api/organizations/{org}/usage URL the VS Code /usage command and the claude.ai/settings/usage page read from. Cookies are your existing claude.ai session, so there is no cookie paste and no new auth flow. MIT licensed; the file is 121 lines total.
What the menu bar dropdown actually looks like
You can also pipe this same data through the CLI in your VS Code integrated terminal. The output is identical to the menu bar dropdown, with the same six rows.
The menu bar item itself just shows the worst-of (5-hour, 7-day) as a percent: a green 78 in this snapshot. At 80%+ it goes orange; at 100% red. That is enough peripheral signal to know whether to start a two-hour agentic loop or not, without ever opening the Claude Code panel to type /usage.
Workflow with vs without the meter
Same VS Code, same Claude Code extension, same Pro or Max plan. Toggle to flip between the two states.
You start a refactor in plan mode, hit accept, watch the diffs land, and ten minutes in the panel suddenly says message limit reached. You scroll back to find /usage in the slash menu, run it, see 100% on the 5-hour. You do mental math against resets_at. Tomorrow you forget again, because the number was never visible the rest of the time.
- /usage is a one-shot, not a status indicator
- First signal is the failure itself
- Mental math against a timestamp every time
- Easy to start an agentic loop you cannot finish
Adding it to your VS Code workflow
Four steps. Nothing about your VS Code or Claude Code extension configuration changes; this is purely additive.
Keep the Anthropic Claude Code extension where it is
claude-meter does not replace it. Leave the Spark icon in your VS Code editor toolbar, leave plan/auto-accept/normal mode the way you set it. The only thing this changes is what is visible outside the editor.
Install the menu bar app
brew install --cask m13v/tap/claude-meter. The cask installs ClaudeMeter.app and the claude-meter CLI under /Applications/ClaudeMeter.app/Contents/MacOS/. No account creation, no sign-in screen, no telemetry. The app reads its data from your existing claude.ai browser session via the extension; nothing about VS Code changes.
Load the browser extension once
git clone the repo, open chrome://extensions (or arc://extensions etc.), enable Developer mode, Load unpacked, point it at the extension/ folder. Visit claude.ai once so the extension picks up your session cookie. From here a single HTTPS request per minute hits /api/organizations/{uuid}/usage and POSTs the snapshot to the menu bar app on localhost:63762.
Drop the meter into your peripheral vision and forget it
The menu bar item shows the worst of (5-hour, 7-day) as a percentage. The dropdown shows the full six-row breakdown. The browser extension's toolbar badge is the same percentage. While you stay typing in VS Code, the number ticks down from the corner of your eye. Type /usage in Claude Code only when you want the verbose dump.
Where this gets people in trouble
The most common mistake: assuming /usage and ccusage answer the same question, and that running both is redundant. They do not. ccusage measures local Claude Code tokens against the public price card. /usage and claude-meter measure plan quota the server enforces. ccusage at 5% of estimated spend while the rolling 5-hour bar is at 100% used is a real, frequent state. Both numbers are correct; they describe different things.
The second mistake: assuming the rolling 5-hour resets exactly 5 hours after the first message of your session. It does not exactly. The resets_at field on /usage is the actual server-side timestamp, exact to the second. The menu bar dropdown prints it (e.g. resets Tue May 5 18:00 (in 2h)). Trust that, not your wall clock.
The third mistake: forgetting that on a Max plan with extra usage enabled, the 5-hour bar can sit at 100% for hours while you are still serving prompts via the metered ledger. The menu bar has a separate Extra usage row for exactly this case, so you can tell “rolling window pegged but spending dollars fine” apart from “rolling window pegged and 429 imminent.” The slash command shows the same fields, but it scrolls.
The honest caveat
The /api/organizations/{org}/usage endpoint is undocumented, the same way the data behind /usage inside the Anthropic VS Code extension is undocumented. Anthropic could rename a field tomorrow. claude-meter declares every nullable field as Option in Rust and ships a same-day patch when something shifts; the cask updates pick it up. macOS only today (12+); Safari is not yet supported. If you live in Linux or Windows the slash command is the only option and the workflow gap stays. The repo is open at github.com/m13v/claude-meter if you want to see exactly what it sends.
Hitting the wall mid-refactor in VS Code?
15 minutes. Walk me through your Claude Code workflow, I will show you what claude-meter would tell you about it on day one.
Frequently asked questions
Does the Anthropic VS Code extension already show plan usage?
It exposes a /usage slash command in the prompt box. The Anthropic VS Code docs page (code.claude.com/docs/en/vs-code) lists it in the command menu alongside file attachments, model switching and extended thinking. /usage is a one-shot dump: you type it, you read it, the answer scrolls off as soon as you keep prompting. There is no persistent indicator in the VS Code chrome that tells you the 5-hour window is at 78% before the next agentic loop starts.
Does claude-meter replace the VS Code Claude Code extension?
No. They are complementary. The VS Code extension is where you run prompts, review diffs, manage permission modes and accept edits. claude-meter is a separate macOS menu bar app and browser extension whose only job is to keep the rolling 5-hour, 7-day, and extra-usage numbers visible while you work in VS Code. You install both. Neither cares the other exists.
Where does claude-meter get its numbers from?
From claude.ai/api/organizations/{org}/usage, the same internal endpoint the VS Code extension's /usage command and claude.ai/settings/usage page read. The browser extension (extension/background.js, line 24) calls that URL with your existing claude.ai cookies once per minute and pushes the snapshot to the menu bar app over localhost. Numbers match Settings exactly because they come from the same source of truth.
Will claude-meter measure tokens spent inside VS Code?
No, by design. Token counting from the local Claude Code session lives in ccusage, which reads ~/.claude/projects/<project>/<session>.jsonl on disk. claude-meter measures plan quota, not token spend. If you want both views (cost-per-session locally and quota-remaining server-side) you run the two side by side. They answer different questions.
What runs while VS Code is closed?
claude-meter does. The macOS menu bar app and the browser extension are independent of VS Code's lifecycle. Even with VS Code quit and Claude Code idle, the meter keeps polling the rolling window so when you come back, it is already current. The /usage slash command obviously does not run unless you have an open Claude Code conversation in VS Code.
Is there a CLI I can pipe into a VS Code status bar widget?
Yes. The brew cask installs a claude-meter binary at /Applications/ClaudeMeter.app/Contents/MacOS/claude-meter that prints the same percentages and reset timestamps to stdout (with --json for machine-readable output). You can wire that into a custom VS Code status-bar contributor extension, into the integrated terminal as a Starship segment, or into tmux. The CLI is the same code path as the menu bar; nothing extra is required.
Does it work with Claude Code's worktree mode?
claude --worktree spins up an isolated branch and file state but uses the same Anthropic plan. The rolling window is account-wide on the server, so claude-meter's number reflects every parallel worktree, every other VS Code window, and every claude.ai web tab combined. That is what you want: one quota, one meter, regardless of how many parallel Claude Code conversations you have open.
I am on Cursor, not VS Code. Does this still work?
Yes. Anthropic ships the same Claude Code extension to Cursor (cursor:extension/anthropic.claude-code per the Anthropic docs page), and claude-meter does not care which IDE you run in: it reads claude.ai cookies from your Chromium-family browser, not from your editor. The workflow gap is identical: /usage is one-shot inside the editor, claude-meter is live outside it.
How do I keep the menu bar number visible without a full-screen VS Code?
On macOS the menu bar is always visible in the standard window mode and stays visible in Stage Manager. In native full-screen the menu bar auto-hides; either move VS Code into a tiled split (System Settings > Desktop & Dock > 'Show menu bar in full screen': on) or use the CLI in your VS Code integrated terminal as an always-on second display. The browser extension toolbar icon also shows the 5-hour percentage as a badge, so a pinned Chrome window in Stage Manager works too.
Keep reading
Claude Code usage in the menu bar: what to actually look at
Six rows, one glance. The menu bar layout that maps each row to a different concrete failure mode (5-hour wall, weekly cap, opus-specific cap, metered BLOCKED).
Claude Code rolling 5-hour usage: what triggers the wall
How the 5-hour bucket is actually shaped on the server, what messages count toward it, and why the count from your VS Code session does not match the claude.ai number.
ClaudeMeter vs ccusage
ccusage measures local Claude Code tokens off disk. ClaudeMeter measures plan quota off claude.ai. Many heavy VS Code Claude Code users run both.