Claude Code rolling 5-hour usage: three ledgers, three answers, and /usage is only one of them

You probably came here from a thread asking how to watch the rolling 5-hour bucket while Claude Code is running. There is no single right answer because three tools read three different sources. This page walks each one with its actual field path, calls out the part most posts get wrong (browser-chat depletes the same bucket), and tells you which pair to run together so you stop being surprised by mid-loop 429s.

M
Matthew Diakonov
6 min read

Direct answer (verified 2026-05-01)

Type /usage at the Claude Code prompt for a snapshot. Run ccusage for what your CLI sent on this machine. Run a server-quota tool like ClaudeMeter for the live float Anthropic actually checks before throwing 429. All three read different ledgers. The third one is the only one that sees your browser-chat usage, which depletes the same five_hour bucket per Anthropic's help docs. Source for the cookie path is verifiable at extension/background.js.

Ledger 1: /usage inside Claude Code

Claude Code ships a built-in slash command. Type /usage inside an active session and it prints a three-line snapshot: current session percentage, current week percentage, any extra-usage balance. That is the entire output. It does not stream, it does not show the rolling 5-hour countdown, and it interrupts whatever long-running task you typed it on top of.

What /usage prints, and what it does not

Under the hood it is calling Anthropic's OAuth-authenticated endpoint at api.anthropic.com/api/oauth/usage with the Bearer token Claude Code already has, plus the anthropic-beta: oauth-2025-04-20 header. The cookie-authenticated equivalent that claude.ai/settings/usage uses is GET claude.ai/api/organizations/{org_uuid}/usage. Same JSON shape, two auth paths. /usage shows you the value once. Anything that wants a live meter needs to poll one of those two endpoints itself.

Ledger 2: ccusage and other local-token tools

The most-recommended Claude Code usage tools in 2026 are ccusage and Claude-Code-Usage-Monitor. Both walk ~/.claude/projects/*.jsonl and total the tokens your Claude Code CLI has sent on this machine. That is a faithful, complete record of one channel and an excellent way to attribute spend to a specific session, project, or model.

What ccusage sees, and what it cannot see

What it cannot see is the rest of the rolling 5-hour bucket. Per Anthropic's help article Using Claude Code with your Pro or Max plan, claude.ai chat and Claude Code share the same usage pool. If you drafted a PR description in the browser tab this morning, that drafting depleted the same five_hour bucket your loop is now hitting. ccusage will not see it because there is no JSONL on disk for browser sessions. Same on a multi- machine setup: ccusage on your laptop knows nothing about the desktop. Recent ccusage versions added an OAuth flag that calls the server endpoint directly, which closes this gap, but plain ccusage watching JSONL does not.

Ledger 3: the float that 429s your loop

The number Anthropic's rate limiter actually compares against 1.0 before it 429s your next prompt is usage.five_hour.utilization on the response from GET /api/organizations/{org_uuid}/usage. Same field /usage prints as the session percentage. Same field claude.ai/settings/usage renders as the bar. The trick is reading it without typing a slash command and without opening a browser tab.

The same float, live, no slash command

The thing every other server-quota tracker stumbles on is auth. Three common patterns: paste your sessionKey from DevTools, sign into claude.ai inside an embedded webview, or hand over a console API key (which sees console spend, never plan quota). All three add a manual step the user has to redo when the cookie rotates. A real Manifest V3 extension running inside the same Chromium browser you are already logged into has a fourth option, and it is one keyword on a fetch call:

extension/background.js

The browser attaches the existing claude.ai cookie to the request the same way it would for any tab on claude.ai/settings/usage. No paste. No second sign-in. No console API key. The endpoint returns eight Window structs (rolling 5-hour, plus seven 7-day buckets including Sonnet-specific and Opus-specific) and an extra_usage block for the April 2026 metered-billing fall-through, all typed in src/models.rs. The macOS menu bar polls every 60 seconds (POLL_INTERVAL at src/bin/menubar.rs:18).

Three ledgers, eight rows that distinguish them

/usage is the easiest to reach (it is in the CLI), ccusage is the most precise on local spend, ClaudeMeter is the only one that runs live without a typed command. They are not alternatives.

Feature/usage and local-token tools (ccusage, Claude-Code-Usage-Monitor)Live server-quota meter (ClaudeMeter)
How you read it/usage at the Claude Code prompt (interrupts the loop) or ccusage --watch (terminal pane).Always-visible menu bar chip + claude-meter status JSON. No command typed.
What it actually queries/usage: same server endpoint, snapshot only. ccusage: ~/.claude/projects/*.jsonl on disk.GET claude.ai/api/organizations/{org_uuid}/usage (or /api/oauth/usage). Server-truth.
Live or snapshot?/usage: snapshot, you re-type it. ccusage --watch: live but only on local tokens.Live. Polled every 60s (POLL_INTERVAL src/bin/menubar.rs:18).
Sees browser-chat usage on the same plan?/usage: yes, it reads the same bucket. ccusage: no. JSONL only has Claude Code traffic.Yes. The five_hour bucket counts every prompt against your plan, regardless of source.
Sees per-model weighting and peak-hour multiplier?/usage: yes. ccusage: no, it counts raw tokens.Yes. The server returns post-weighting utilization.
Multi-machine?/usage: yes. ccusage: only this machine's JSONL.Yes. The bucket is per-org, so any machine that polls sees the same number.
Predicts the 429 before you hit it?/usage: only if you remember to type it. ccusage: no, the local count and server count diverge.Yes, at 80% threshold. The chip turns orange before the next prompt fails.
Cost/usage: built into Claude Code. ccusage: free, MIT.Free. MIT.

Five things to remember before you pick a tool

Mental model for the rolling 5-hour bucket

  • /usage is a snapshot. It prints session percent, week percent, extra-usage balance, then returns control. It does not update. If you want a live meter you need something that polls the same endpoint /usage reads, but from outside the CLI.
  • Browser-chat and Claude Code share the same five_hour bucket on Pro and Max. Local-token tools (ccusage, Claude-Code-Usage-Monitor) read ~/.claude/projects/*.jsonl, which only contains Claude Code traffic. They are blind to the chat half of the same bucket.
  • The 429 fires on server-side utilization. Any tool that does not call /api/organizations/{org_uuid}/usage (or /api/oauth/usage with the OAuth beta header) is structurally unable to predict it. Local token counts and server utilization can drift 30-40 points and both still be correct.
  • The bucket is rolling, not sliding. resets_at is a wall-clock timestamp that slides forward as you keep sending messages. Stopping for 5 hours from now is not the reset; the earliest unexpired message ageing out is.
  • An Anthropic API key from console.anthropic.com cannot read this. The console API key sees console spend, not plan quota. Trackers that ask for an API key are reading a different ledger and will never see the rolling 5-hour bucket.

Install path, the 60-second version

Read this from your phone, install later from a Mac. The full path is one brew command plus a one-time browser-extension load. Both halves are open source on GitHub.

  1. Step 1brew install --cask m13v/tap/claude-meterDrops the macOS menu bar app and the claude-meter CLI in one command.
  2. Step 2Load the unpacked browser extension from github.com/m13v/claude-meter/tree/main/extension into Chrome, Arc, Brave, or Edge. The extension is what forwards your existing claude.ai cookie so the menu bar app does not need a second sign-in.Or pull the prebuilt zip from Releases.
  3. Step 3Visit claude.ai once so the extension can pick up your session. Within about 60 seconds the menu bar shows your rolling 5-hour percent and the resets-at countdown. Type claude-meter status --json from any shell to drop the same number into a status line.

Common questions about the rolling 5-hour bucket

What is the rolling 5-hour usage in Claude Code?

It is a 5-hour sliding window. The clock starts when you send your first prompt, and at any moment the bucket measures the cost of all your activity in the last 5 hours. The bucket fills based on a server-side weighting (per model, peak-hour multiplier, attachments, tool calls), not on raw token counts. When the bucket crosses 1.0, every further prompt from your org returns 429 until the earliest unexpired message ages out. Per Anthropic's help docs, claude.ai chat and Claude Code share this same bucket on Pro and Max plans.

How do I see my rolling 5-hour usage from inside Claude Code?

Type /usage at the Claude Code prompt. It is a snapshot of session percentage, weekly percentage, and any extra-usage balance. It interrupts whatever you were doing, prints once, and does not update. The same Help Center note that introduces /status says nothing about how to read the rolling window itself; for a live always-visible meter you need a tool that polls the same endpoint /usage is reading, but does it from outside the CLI so it does not block your loop.

What does /usage actually read under the hood?

The OAuth-authenticated endpoint at api.anthropic.com/api/oauth/usage. The cookie-authenticated equivalent that claude.ai/settings/usage uses is GET claude.ai/api/organizations/{org_uuid}/usage. Both return a JSON object with a five_hour field that has utilization (a float between 0 and 1, or sometimes 0 and 100 in the same payload) and resets_at (an ISO timestamp). Same shape, two auth paths. Pick whichever matches the credential you already have.

Why does ccusage say 5% used while Claude Code 429s me?

Different ledgers. ccusage walks ~/.claude/projects/*.jsonl and totals input_tokens + output_tokens across every session on this machine. The 429 is decided by the server-side five_hour utilization, which factors in browser-chat usage, per-model weights (Opus is heavier than Sonnet on the same byte count), the peak-hour multiplier Anthropic announced in late 2025, attachments, and tool-call overhead. The two numbers can drift by 30 to 40 points and still both be correct readings of what they actually measure.

Does my claude.ai browser chat eat into my Claude Code rolling 5-hour usage?

Yes. Anthropic's help article 'Using Claude Code with your Pro or Max plan' is explicit: claude.ai chat and Claude Code share the same usage pool on subscription plans. If you draft a PR description in the chat tab and then run an agentic loop in Claude Code, both deplete the same five_hour bucket. Local-token tools like ccusage and Claude-Code-Usage-Monitor only see the Claude Code half because the JSONL files do not exist for browser sessions.

Can I see the rolling 5-hour usage without typing /usage every time?

Yes, but not from inside Claude Code. The CLI does not have a passive status line that updates while you work. Three ways out: (1) watch claude.ai/settings/usage in a tab, (2) install a local-token monitor like ccusage --watch (sees only your Claude Code traffic, will lag the server), (3) install a server-quota monitor that polls the same endpoint /usage reads but from outside the CLI. ClaudeMeter is the third path: it polls /api/organizations/{org}/usage every 60 seconds (POLL_INTERVAL at src/bin/menubar.rs:18, POLL_MINUTES at extension/background.js:3) and renders the float in the macOS menu bar so you can glance at it during the loop.

Is the rolling window per-machine or per-account?

Per-account, more precisely per-organization. The five_hour bucket is computed on the server and keyed off your org_uuid. If you run Claude Code on a laptop and a desktop logged into the same Anthropic account, both deplete the same bucket. If you also chat in a browser, that adds to the same bucket. ccusage on the laptop will only ever see the laptop's local Claude Code traffic, so on a multi-machine or chat-heavy day it underestimates the rolling 5-hour usage by a lot.

What does the /usage output actually look like?

Per third-party walkthroughs (the official help docs are sparse): three numbers in one block, current session percentage, current week percentage, and any extra-usage balance from Anthropic's metered fall-through. It does not show a countdown to the rolling 5-hour reset and it does not stream. You read it once and go back to coding. If you want the resets_at timestamp the server actually returns, you have to read it from the underlying endpoint yourself or use a tool that surfaces it.

Does Anthropic block tools that poll /api/organizations/{org}/usage?

It is your own session calling the same endpoint claude.ai/settings/usage already calls every time you open the page. ClaudeMeter polls once per minute per browser, well below normal browsing traffic. The endpoint is undocumented, which means Anthropic can rename fields, not that they prohibit reading them. The Rust types in src/models.rs declare every Window field as Option, so when fields change the next brew release patches them in one line.

What is the right pair of tools for someone running agentic Claude Code loops?

Run a local-token tool (ccusage) and a server-quota tool (ClaudeMeter, or ccusage with the OAuth flag) at the same time. The first answers 'what did this machine spend?'. The second answers 'when does my next prompt 429?'. Treating them as alternatives is a category error; they read non-overlapping sources and give you complementary data. The /usage slash command is fine as a one-shot sanity check but it will not save you from a mid-refactor 429 because by the time you remember to type it, you are already at 91 percent.

Hitting the wall mid-refactor and not sure why?

If your team runs Claude Code in agentic loops and the rolling 5-hour math keeps surprising you, book a 20-minute call and I will help you wire the right meter into your workflow.