Claude Code rolling 5-hour vs weekly quota: what they actually are, and which one 429s you

Two separate caps. Either one can independently 429 your Claude Code loop while the other sits at zero. Most explanations on this topic treat them as variations of the same limit. They are not. They cap different things, slide on different time bands, and on the server they are sibling fields on the same JSON object claude.ai returns. Here is what each one is, when each one bites, and the actual code inside claude-meter that reads both.

Direct answer (verified 2026-05-06)

The rolling 5-hour caps burst usage in a sliding 5-hour band that resets continuously as old prompts age out (roughly 45 messages on Pro, 225 on Max 5x, 900 on Max 20x). The weekly quota caps total compute hours over a sliding 7-day band (roughly 40 to 80 hours on Pro, 140 to 280 on Max 5x, 240 to 480 on Max 20x). On the server they are separate fields (five_hour and seven_day) on the same /api/organizations/{org}/usage JSON. Either one independently 429s your Claude Code loop. Source: Anthropic's August 28, 2025 announcement and the same internal endpoint claude.ai/settings/usage renders.

Side by side

Same plan, same JSON. Two columns of behavior the documentation hides behind one phrase (“rate limits”).

FeatureRolling 5-hour (five_hour)Weekly quota (seven_day)
What it capsBurst usage. A weighted utilization fraction that fills as you prompt and drains as old prompts age past the 5-hour mark.Total compute over a 7-day rolling band. Pro is roughly 40 to 80 hours per week, Max 5x is 140 to 280, Max 20x is 240 to 480.
Window lengthSliding 5 hours. resets_at moves continuously as messages age out.Sliding 7 days. resets_at also moves but the bucket rarely falls since 7 days absorbs most idle time.
Server JSON fieldfive_hour.utilization (float between 0 and 1, sometimes 0 and 100 in the same payload) and five_hour.resets_at (ISO timestamp).seven_day.utilization and seven_day.resets_at, plus seven_day_sonnet and seven_day_opus on Max plans, plus seven_day_oauth_apps on accounts using Claude Code.
When it bites you on ProOften. Plan limits ~45 messages per 5-hour window, and a long Opus message with attachments can be 5 to 10 of those.Rare on Pro unless you push 6+ hours of activity per day across the whole week.
When it bites you on Max with Claude CodeOn long agentic loops at hour 3 of a session.On Tuesday afternoon, especially the seven_day_opus sub-bucket, because Opus is heavier per byte than Sonnet.
Does ccusage see it?No. ccusage reads local JSONL token totals; the server-side weighting and browser-chat usage are invisible to it.No. Same reason. Plus the weekly weighting includes oauth-app traffic and other surfaces that never write to ~/.claude/projects.
Effect of peak-hour multiplierYes (per Anthropic March 2026: weekdays 5 to 11 a.m. Pacific). The same prompts fill it faster during peak.No. Anthropic statement explicitly leaves overall weekly limits unchanged.
Visible in /usage inside Claude Code?Yes, as a session percentage.Yes, as a week percentage. Plus extra-usage balance if you opted in.

Both limits, one JSON

The clearest way to see the difference is to look at what claude.ai actually sends back. Every time the Settings page loads, your browser fetches /api/organizations/{org_uuid}/usage using your existing session cookie. The response is one JSON object with both buckets on it. Below is a real-shaped payload (with numbers swapped to a typical Max-plan day):

GET /api/organizations/{org_uuid}/usage

Notice that five_hour and seven_day have the exact same shape: a utilization float and a resets_at timestamp. The semantic difference (5-hour burst cap vs 7-day compute ceiling) is invisible at the data layer. That is why a Rust struct that knows how to parse one knows how to parse the other:

src/models.rs

Both fields are Option<Window> because either one can be missing on certain plan tiers. The server-side check that 429s your request looks at whichever bucket you crossed first.

Which one is about to bite

The browser extension picks the worst of the two for the toolbar badge color. If either one is at 100%, your next request is going to 429, regardless of how empty the other one is. The full code is eight lines:

extension/background.js

So when ClaudeMeter shows 78% green in the menu bar, what it is really saying is “the worse of (5-hour, 7-day) is 78%.” You open the dropdown to see which one is which, and to see the Opus and Sonnet sub-buckets that are usually the actual cause on Max.

A real Max-plan workday

Below is what the dropdown looks like on a typical Tuesday afternoon for someone running Claude Code in agentic loops on Max. The 5-hour bucket is fine, but the weekly Opus sub-bucket is at 91%. If you do not look at the breakdown, the menu bar badge says 78 (the worse of 5-hour at 78 and 7-day overall at 62) and you assume you are fine. You start an Opus refactor and 429 within a hundred prompts.

claude-meter status, Tuesday 4 p.m.

The lesson: the 5-hour and the 7-day are not stand-ins for each other, and on Max the 7-day Opus row is the one to watch. Switch to Sonnet for the rest of the week and the Opus bucket bleeds back down while Sonnet picks up the slack.

Three real failure modes (each one a different bucket)

Pro user, 11 a.m. Pacific Tuesday:Claude Code dies mid-refactor with “message limit reached.” The 5-hour bucket is at 100%, the 7-day is at 18%. This is the peak-hour multiplier (Anthropic March 2026: 5 to 11 a.m. Pacific weekdays). Your same prompt count would have left you at maybe 60% of the 5-hour at midnight. Wait two hours, the 5-hour resets_at slides forward, and you are back in.

Max user, Tuesday 4 p.m.: No 5-hour wall yet, but every prompt 429s. The 5-hour bucket is at 78%, the seven_day_opus sub-bucket is at 100%. The weekly Opus cap hit before the rolling 5-hour did. resets_at on seven_day_opus is five days out. You are not getting your Opus loop back this week; the only fix is to switch the model to Sonnet (or Haiku) for the rest of the week and let Opus age out.

Max user with extra-usage on, Friday 8 p.m.: Looks identical to scenario 2 from the outside, but the dropdown shows Extra usage at $73 / $200 and prompts are still going through. The 5-hour was pegged at noon, you flipped over to metered overage without realizing, and you have been spending dollars per prompt for 8 hours. ccusage shows $0 because metered overage is not in JSONL. The Extra usage row in the menu bar is the only place this is visible without logging into the billing page.

Why ccusage cannot tell you which one is biting

ccusage is excellent at what it does: walking ~/.claude/projects/*.jsonl and totalling input_tokens + output_tokens for sessions on this machine. Cost per pull request, cost per session, model mix, all easy. But neither the 5-hour nor the 7-day is a token count. They are weighted utilization fractions on the server, and the server weights them with three things ccusage cannot see:

  • The peak-hour multiplier on the 5-hour bucket (5 to 11 a.m. Pacific weekdays per Anthropic). Same byte count, different multiplier.
  • Claude.ai chat usage and IDE-extension usage both deplete the same buckets but never write to ~/.claude/projects.
  • Per-model weighting on the seven_day_opus and seven_day_sonnet sub-buckets. An Opus byte is heavier than a Sonnet byte against the weekly cap.

Run ccusage for cost. Run claude-meter for limits. They answer different questions and the answers can drift by 30 to 40 points while both are correct.

The honest caveat

The /api/organizations/{org}/usage endpoint is undocumented. The published Anthropic numbers (Pro ~45 messages per 5 hours, ~40 to 80 weekly hours, etc.) come from the Help Center as ranges, not contracts; the actual fraction the server checks is a weighted internal float with no published formula. The only thing you can really trust is the float in the JSON. ClaudeMeter declares every nullable field as Option in Rust, so when Anthropic adds, removes, or renames a sub-bucket, the next brew release patches it in one line. macOS only today (12+); Safari is not yet supported. The repo is open at github.com/m13v/claude-meter if you want to see exactly what it sends.

Hitting both walls? Want me to look at your usage with you?

15 minutes. Walk me through your Claude Code week. I will tell you which bucket is the actual problem and what to switch to so you stop blowing through the wrong one.

Frequently asked questions

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

It is a sliding 5-hour budget that fills as you prompt and drains as your oldest prompts age past the 5-hour mark. The clock starts on your first prompt of a session, and at any moment the bucket measures the cost of all activity in the last 5 hours, weighted by model class, attachments, tool calls, and a peak-hour multiplier Anthropic announced in late 2025. On the server it is the float in the five_hour.utilization field of /api/organizations/{org_uuid}/usage. When that float crosses 1.0 every further request from your org returns 429 until the earliest unexpired prompt ages out.

What is the weekly quota in Claude Code?

It is a 7-day rolling ceiling on total compute hours across your account. Anthropic introduced the weekly cap on August 28, 2025 and tightened enforcement through early 2026. Pro is roughly 40 to 80 hours per week, Max 5x is 140 to 280, Max 20x is 240 to 480. On the server it is the seven_day field in the same JSON; on Max plans you also get seven_day_sonnet and seven_day_opus as sub-buckets. The weekly quota is shared: claude.ai chat, the IDE extension, and Claude Code all draw from it.

How are the two limits actually different?

Window length and what they cap. The 5-hour window caps burst usage in a sliding 5-hour band; it is meant to keep one user from saturating the cluster in a sprint. The weekly quota caps total compute hours over a sliding 7-day band; it is meant to keep heavy users from saturating the cluster across an entire workweek. Practically, the 5-hour window resets visibly throughout the day (you watch its resets_at slide forward in real time), while the weekly bucket basically never falls because seven days is long enough that even an idle weekend barely moves the boundary. Either one can independently 429 you, even if the other is at zero.

If I am hitting only one of them, which one is it usually?

On Pro, it is overwhelmingly the rolling 5-hour. Pro lets through enough weekly hours that most people only run out of them on extreme weeks. On Max with Claude Code agentic loops, both happen, often in the same session. People hit the 5-hour wall during a long refactor at hour three, then come back the next day and hit the weekly cap by Tuesday afternoon because the agentic loops chew through compute hours faster than any chat workflow does. The seven_day_opus sub-bucket is the most common Max-plan failure: Opus is heavier per byte, so an Opus-heavy week pegs that one even when seven_day overall is fine.

Does ccusage tell me where I stand on either limit?

No, not directly. ccusage walks ~/.claude/projects/*.jsonl on disk and totals input_tokens + output_tokens for sessions on this machine. That is a reasonable proxy for raw token spend on Claude Code only, but the 5-hour and 7-day floats are server-side, weighted, and include browser-chat usage that is not on disk anywhere. ccusage at 5% of estimated spend while the 5-hour bar is at 100% used is a real, frequent state. ccusage is excellent for cost attribution; it is not a faithful proxy for the limits the server actually enforces.

Where do I see both numbers without typing /usage every time?

claude.ai/settings/usage in a browser tab is the official surface; both rows render there. /usage inside Claude Code is a one-shot dump that scrolls off as soon as you keep prompting. For an always-visible readout, ClaudeMeter polls /api/organizations/{org_uuid}/usage every 60 seconds (POLL_INTERVAL at src/bin/menubar.rs:18, POLL_MINUTES at extension/background.js:3) and pins both rows plus the Opus and Sonnet sub-buckets to the macOS menu bar. Same endpoint, same numbers, different surface.

Do the two limits reset at the same time?

No. They each carry their own resets_at field in the JSON. The 5-hour resets_at slides every time you stop prompting and an old message ages out; in a quiet hour you can watch it tick down. The 7-day resets_at also slides, but in 7-day chunks of activity, so it usually looks more like a hard wall than a sliding window. ClaudeMeter prints both timestamps in the dropdown (-> resets Tue May 5 18:00 (in 2h)) and you trust those, not your wall clock.

Does Anthropic peak-hour throttling affect both limits the same way?

Per Anthropic's March 2026 statement, the company has been adjusting the 5-hour window during peak hours of 5 to 11 a.m. Pacific on weekdays, while leaving overall weekly limits unchanged. So during peak hours the 5-hour bucket fills faster than the same prompts would fill it at midnight, but the seven_day bucket does not get the same multiplier. If you keep getting 5-hour walls before noon Pacific and they go away at night, that is the peak-hour multiplier, not your prompts changing.

Is the rolling 5-hour 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. Same applies to the seven_day bucket. ccusage on one machine cannot see the other machines or the browser, which is one reason its number drifts from the server number on multi-machine days.

I have extra-usage credits enabled. Does that change either limit?

Once you opt in to metered overage on Max, you keep getting prompts after the 5-hour bucket pegs at 100%, but the requests draw from your extra_usage credit balance instead. The seven_day bucket still applies. ClaudeMeter has a separate Extra usage row in the menu bar dropdown, so you can tell rolling-window-pegged-but-spending-dollars-fine apart from rolling-window-pegged-and-fully-blocked. Without that distinction the surprise is figuring out at month end that you spent 200 dollars on overage you did not realize you were on.