Claude Code rate limits: the 5-hour window and weekly caps explained

Claude Code enforces three limits at once, and almost every frustrated post about it confuses them. One is a rolling burst window, one is a weekly budget, and one applies to Opus alone. They behave completely differently, and only one of them is fixed by switching model.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Claude Code runs a rolling 5-hour window for burst protection, a separate weekly cap for total volume, and a separate allowance for Opus. The session and weekly limits are shared across every model, so switching model does not restore access; the Opus limit is the one exception. Consumption tracks tokens, not turns, so model choice, context size, and tool output volume dominate. Anthropic doubled the 5-hour limits on 6 May 2026 and has been running a 50% weekly increase that, as of August 2026, is scheduled through 19 August 2026.

What you need to know
  • There are three limits, not one: a rolling 5-hour session window, a weekly cap, and a separate Opus allowance.
  • The session and weekly limits are shared across models. Switching with /model does not restore access. The Opus limit is the exception.
  • The 5-hour window is rolling: capacity returns gradually, and the error tells you the reset time.
  • Anthropic doubled the 5-hour limits for Pro, Max, Team, and seat-based Enterprise on 6 May 2026 and removed the peak-hours reduction.
  • Consumption tracks tokens, not turns. One Opus run over a large repo can cost more than fifty short Haiku messages.
  • Your status line can render rate_limits.five_hour.used_percentage and rate_limits.seven_day.used_percentage continuously, so you see the wall before you hit it.

Three limits, not one

100%0window full09:0011:0013:0015:0017:00consumption ages out continuously. capacity returns while you wait
Why there is no reset moment. A heavy morning pushes you into the ceiling, then decays continuously as it ages out of the trailing five hours.

When Claude Code stops accepting work, it names which ceiling you hit. The three messages look almost identical and mean very different things.

The three limit messages, as Claude Code prints them
You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am
You've hit your Opus limit · resets 3:45pm
Session (5-hour)WeeklyOpus
PurposeBurst protectionTotal volume budgetProtects the most expensive model
ShapeRolling, refills graduallyResets on a weekly scheduleModel-scoped allowance
Shared across modelsYesYesNo, Opus requests only
Does /model help?NoNoYes. Switch and keep working
Typical triggerOne intense afternoonA sustained heavy weekLeaving Opus as your default

The rolling window is the part people get wrong

It is not a bucket that empties at a fixed time. It is a trailing measurement of what you consumed over the past five hours. If you burned most of your allowance between 9am and 11am, that consumption ages out gradually through the early afternoon rather than all at once. Sitting and waiting for a "reset moment" is the wrong mental model; capacity is already returning while you wait, and the error prints the exact time it clears.

What actually consumes your allowance

Limits are measured in compute, which tracks tokens processed, not messages sent. Five things dominate, roughly in order of size.

01

Model choice

Opus-class models cost several times what Haiku-class models cost for identical work. This is the largest single lever available to you, and it is one keystroke.

02

Long context

Claude Code sends your full conversation with every request, and each tool use sends another request carrying that batch of results. A one-line question in a session that has been open all day still draws usage for the whole conversation.

03

Cache misses

Your first message after a break longer than the cache lifetime reprocesses the full context at the full input rate instead of a tenth of it. The lifetime is an hour on a subscription, and drops to five minutes once you are drawing on usage credits or using an API key.

04

Tool output volume

A grep that returns 4,000 lines, a test suite that prints its whole log, a read of a 6,000-line module: all of it lands in context and is re-sent on every later turn. Agents that run noisy commands burn allowance quickly.

05

Parallel work

Two agents on one account draw from one pool. Agent teams are worse: Anthropic documents them at roughly 7x the tokens of a standard session when teammates run in plan mode, because each teammate keeps its own context window.

Reading the gauges before you get blocked

The failure mode worth designing around is not the block itself. It is being blocked twenty minutes into a refactor with a half-applied change on disk. Three surfaces tell you where you stand.

1. /usage, on demand

On a Pro, Max, Team, or Enterprise plan, /usage shows plan usage bars plus a breakdown of what is consuming them: usage attributed to skills, subagents, plugins, and individual MCP servers, each as a percentage. It also raises behavior flags for anything accounting for 10% or more of recent usage, such as long context or cache misses. Press d or w to switch between the last 24 hours and the last 7 days.

2. The status line, continuously

A custom status line receives session JSON on stdin, and that JSON carries the live rate-limit state. This is the cheapest way to keep both windows in front of you at all times.

The rate-limit fields in the status line JSON
{
  "rate_limits": {
    "five_hour":  { "used_percentage": 23.5, "resets_at": 1738425600 },
    "seven_day":  { "used_percentage": 41.2, "resets_at": 1738857600 }
  },
  "context_window": {
    "used_percentage": 8,
    "remaining_percentage": 92,
    "context_window_size": 200000
  }
}
A minimal status line that shows both windows
#!/bin/bash
# save as ~/.claude/statusline.sh, chmod +x, then point settings.json at it
input=$(cat)
h5=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // 0')
d7=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // 0')
ctx=$(echo "$input" | jq -r '.context_window.used_percentage // 0')
printf '5h %.0f%%  |  7d %.0f%%  |  ctx %.0f%%' "$h5" "$d7" "$ctx"

3. Every device, all the time

What changed in 2026

The limits landscape moved several times, which is why advice written in 2025 misleads now.

Dated changes. Treat the specific multipliers as descriptions of shape, not contracts.

DateWhat changed
2025Weekly caps introduced alongside the existing 5-hour window, in response to a small number of accounts running agents continuously.
6 May 20265-hour limits doubled for Pro, Max, Team, and seat-based Enterprise plans.
6 May 2026The peak-hours reduction was removed for Pro and Max Claude Code accounts, so busy periods no longer shrink your allowance.
13 May 2026Weekly limits raised 50% as a promotion, initially through 13 July 2026.
As of August 2026That 50% weekly promotion has been extended repeatedly and is currently scheduled to run through 19 August 2026. Free plans and consumption-based Enterprise seats are excluded, and the 5-hour limit is unchanged by it.

How to stop hitting them

Match the model to the task

Use the biggest model for architecture, hard debugging, and anything where being wrong is expensive. Use a mid-tier model for implementation against a clear spec. Use the smallest for mechanical work: renames, boilerplate, running and reading tests. For subagents, set model: haiku in the subagent config.

Switching model and effort
# Inside a session
/model            # switch model, saved as the default for new sessions
/effort low       # low, medium, high, xhigh, max

# Or start pinned
claude --model sonnet --effort medium

Turn thinking down, not off

Extended thinking is on by default and its tokens bill as output tokens. For simple work, lowering the effort level with /effort is the cheap fix. On models with a fixed thinking budget you can also set MAX_THINKING_TOKENS, for example MAX_THINKING_TOKENS=8000; adaptive-reasoning models ignore nonzero budgets, so use effort levels there instead.

Clear rather than compact between unrelated tasks

/compact has to read the conversation it summarises, so compacting a large context is itself a large request. When the next thing you type is unrelated to the last thing, /clear is both cheaper and better: it costs nothing. Rename the session first if you want to find it again.

Reclaiming context
/rename tax-rounding-fix   # label it before you leave
/clear                     # free, drops everything
/compact Focus on the API surface and test output   # keeps continuity, costs a pass
/resume                    # come back to it later

Keep tool output small

Tell the agent to pipe noisy commands through head, run focused tests rather than whole suites, and grep with tight patterns. A PreToolUse hook that rewrites test commands to show only failures turns tens of thousands of tokens into hundreds, deterministically, without relying on the model to remember.

Move long instructions out of CLAUDE.md

CLAUDE.md loads into context at session start, every session. Detailed workflow instructions sitting there are paid for even when you are doing something unrelated. Move them into skills, which load only when invoked, and keep CLAUDE.md under about 200 lines.

Separate the accounts if you run agents in parallel

If you routinely run two or three sessions at once, one subscription is structurally the wrong shape. Two Max 5x accounts cost the same as one Max 20x and give you two independent windows.

Plan limits versus a 429

One more distinction, because the fixes are unrelated. A plan limit is a subscription window closing. A 429 is an API rate limit on a key, a Bedrock project, or a Google Cloud project.

API Error: Request rejected (429) · this may be a temporary capacity issue.
If it persists, check https://status.claude.com.
  • Run /status and confirm the active credential is the one you expect. A stray ANTHROPIC_API_KEY in your environment routes requests through a low-tier key instead of your subscription, and this is the single most common cause of a surprise 429.
  • Check your provider console for the active tier and request a higher one if needed.
  • Reduce concurrency: lower CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY, avoid many parallel subagents, or switch to a smaller model for high-volume scripted runs.

If it is a plan limit and you need to finish today, /usage-credits buys overflow on Pro and Max, or sends a request to your admin on Team and Enterprise. Remember the cache-lifetime cost: once you are on credits, the prompt cache drops from an hour to five minutes.

Questions people ask

The error prints the exact reset time, for example "resets 3:45pm". It is a rolling window measuring consumption over the trailing five hours, so capacity also returns gradually as earlier usage ages out rather than all at once.

Two likely causes. Either your trailing five hours include a heavy session from earlier, or you hit the separate weekly cap. Both counters run simultaneously, and one big fan-out can exhaust the weekly allowance before the session window resets.

Not for the session or weekly limits: those are shared across all models. It does work for the Opus-specific limit, which is why the "You have hit your Opus limit" message is the one where /model actually helps.

No. Max 5x and Max 20x multiply your allowance by 5x and 20x relative to Pro on both the 5-hour window and the weekly cap. The limits still exist, they just arrive later.

Run /usage in a session for plan bars, an attribution breakdown by skill, subagent, plugin, and MCP server, and behavior flags. For a continuous view, add rate_limits.five_hour.used_percentage and rate_limits.seven_day.used_percentage to a custom status line.

Yes, if they run under one account. Three simultaneous sessions consume roughly three times as fast, and agent teams run about 7x a standard session in plan mode. Separate accounts have separate windows.

No. API usage is metered per token with no 5-hour or weekly plan windows. It is subject to per-organisation rate limits instead, which surface as HTTP 429 rather than a plan-limit message.

Yes. Run /usage-credits after signing in with a claude.ai subscription. On Pro and Max it opens billing settings; on Team and Enterprise without billing access it sends a request to your admins. It is not available under API-key authentication.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code: usage limit errors the exact limit messages and what each means
  2. Claude Code: manage costs effectively /usage breakdown, cache lifetime, agent team costs
  3. Claude Code: status line reference the rate_limits JSON fields
  4. Claude plans and pricing plan multipliers
Try it

Stop finding out
at the worst moment.

Continuum shows live 5-hour and weekly gauges for every account you run, in the menu bar and on your phone, so you know the window is closing before an agent stops mid-refactor.

free app · your subscriptions · local-first