← All Guides·Guide·Updated 2026-11-23·8 min read

Claude Code 5-Hour Limit vs. Weekly Limit: How Both Windows Work

A practical breakdown of Claude Code rolling 5-hour windows, 7-day weekly ceilings, model-scoped pools, shared claude.ai quota, and how the official statusLine rate_limits feed works.

Developers on Claude Pro, Max, and Ultra plans run into two distinct quota ceilings inside Claude Code: a short 5-hour rolling window and a broader7-day weekly limit. Because both windows are active at the same time (and some models carry their own weekly sub-pools), hitting a lockout often catches people off guard even when one meter looks healthy.

How the 5-hour window works

Your 5-hour window caps short-term burst usage. It starts counting from your first request in an empty window and resets five hours later at a fixed timestamp (resets_at). Heavy multi-file refactors, large context windows, or running parallel Claude Code sessions in two terminals can drain the 5-hour allowance well before your weekly pool is even half used.

Once the 5-hour window reaches 100% used (0% left), Claude Code pauses untilresets_at arrives.

How the 7-day weekly limit works

The 7-day weekly ceiling governs sustained multi-day volume. Even if you carefully pace every individual 5-hour session so you never hit a burst cap, running near 80 to 90% across several sessions per day will accumulate against your weekly quota.

On plans that expose detailed breakdown data, you may also encountermodel-scoped weekly pools (for example separate weekly ceilings for Opus, Sonnet, or newer frontier models like Fable) alongside optional extra-usage credit spend. If a model-specific weekly pool runs out, switching to another model family can still work until the shared 7-day ceiling resets.

Shared quota across Claude Code, claude.ai, and Claude Desktop

All three surfaces (Claude Code in your terminal, claude.ai in the browser, and Claude Desktop) draw from the same subscription allowance. That matters if you rely purely on Claude Code's status line: usage incurred in a browser tab shows up on the next Claude Code assistant reply.

Inspecting limits cleanly via Claude Code's official statusLine

Anthropic's Claude Code legal & compliance termsexplicitly bar third-party apps from collecting or intermediating Claude.ai session tokens or reading the Claude Code-credentials Keychain item to call private OAuth endpoints.

Instead, Claude Code provides an official, documented statusLine hook. After each assistant message (debounced 300 ms), at session start, on /compact, and when a known window reaches resets_at, Claude Code pipes structured JSON on stdin that includes a rate_limits object:

{
  "rate_limits": {
    "five_hour": {
      "used_percentage": 23.5,
      "resets_at": 1738425600
    },
    "seven_day": {
      "used_percentage": 41.2,
      "resets_at": 1738857600
    }
  }
}

Edge cases to know when reading statusLine

  • First API response required: rate_limits appears for Pro, Max, and Ultra plans only after the session's first assistant response.
  • Dropped windows after reset: Once a window passes resets_at, Claude Code omits it until the next turn. A trustworthy tracker treats a passed reset without a fresh reply as pending, never fabricating 0% used.
  • Multiple concurrent sessions: An idle terminal can emit an older percentage than an active one. Within the same reset period, usage is monotonic (the higher percentage wins); a reset timestamp more than two minutes later signals a brand-new period.
  • Project overrides: A repository-level .claude/settings.jsonwith its own statusLine overrides the user-level setting inside that folder.

Why pace projection matters more than raw percentages

Seeing “58% used” without context tells you very little. At 4 hours into a 5-hour window, 58% used means you are 22% under pace and will clear the reset with headroom. At 1.5 hours into the same window, 58% used means you are burning38.7% per hour, putting you on track to hit 100% more than two hours before the reset.

Scenario (5-hour window)UsedElapsedEven PaceProjection
Steady pacing40%2h 30m50%10% under pace · clears reset
Heavy agent loop62%2h 00m40%+22% over pace · runs out ~1h 13m early
Exhausted window100%3h 40m73%0% left · resets in 1h 20m

Want to test your own numbers right now? Plug your current used_percentage and elapsed time into ourinteractive 5-hour burn pace calculator, or let RateLimitBar watch both windows continuously in your macOS menu bar (with an opt-in local detailed reader in Settings when you also want model-scoped Opus, Sonnet, and Fable weekly windows).

See your limits in the macOS menu bar

RateLimitBar: $15 one-time

Native SwiftUI menu-bar monitor for Claude Code & OpenAI Codex. Official CLI sources only, zero credential reads, 7-day free trial.

Download 7-day trialOpen Calculator

Related guides & tools