Blog

Claude Code Usage Limits and Quota (2026): 5-Hour and Weekly Limits, API Rate Limits, Context Size

Claude Code limits come from three different places, and the fix depends on which one you hit:

  1. Plan usage limits (your Claude Code quota) apply when you sign in with a Claude Pro, Max, Team or Enterprise plan: a five-hour session limit and a weekly limit.
  2. API rate limits and spend caps apply when Claude Code uses an Anthropic API key: requests and tokens per minute, set by your organization's usage tier.
  3. Token limits per request come from the model itself: the context window and the maximum output size.

Two common errors are none of these. 529 Overloaded and Server is temporarily limiting requests are temporary capacity problems on Anthropic's side, and they don't count against your quota.

This guide was checked against Anthropic's Claude Code docs, API docs and Help Center on October 27, 2026. Anthropic changes limits from time to time, so follow the links for current values.

Which Claude Code limit did you hit?

Message in Claude Code What it is What to do
You've hit your session limit · resets 3:45pm Plan five-hour session limit Wait for the reset, turn on usage credits, or upgrade
You've hit your weekly limit · resets Mon 12:00am Plan weekly limit Same as above
You've hit your Opus limit / You've hit your Sonnet limit A limit for one model family /model to a model outside that family
You've hit your monthly spend limit · ... Your usage-credits spend limit Raise it in claude.ai Settings > Usage, or wait for the plan reset
API Error: Request rejected (429) · ... Rate limit on your API key, Amazon Bedrock or Google Cloud project Retry later, lower concurrency, request a higher tier
API Error: Server is temporarily limiting requests (not your usage limit) Short server-side throttle Wait briefly; check status.claude.com
API Error: Repeated 529 Overloaded errors. ... The API is at capacity for all users Try again in a few minutes or switch model
Credit balance is too low Console prepaid credits are used up, or an API key is being used instead of your plan Run /status, add credits
Context limit reached · /compact or /clear to continue The context window is full (Prompt is too long) /compact or /clear
API Error: Claude's response exceeded the ... output token maximum One reply hit the output cap Reply continue, or ask for smaller pieces

Source: the Claude Code error reference.

1. Plan usage limits: five-hour sessions and weekly limits

How plan limits work

On paid Claude plans, Claude Code draws on the same allowance as Claude on the web, desktop and mobile apps. Anthropic's Help Center describes these limits (usage and length limits, Claude Code with a Pro or Max plan):

  • Session limit: resets every five hours.
  • Weekly limit: applies across all models and resets at a fixed day and time assigned to your account. You can see your reset time on Settings > Usage.
  • Fable weekly limit: Max plans also have a separate weekly limit for Fable.

Each request counts against the session and weekly limits at the same time, so one heavy burst, such as a large fan-out of subagents, can use up the weekly limit before the session window resets (error reference). Claude Code can also show separate limits for the Opus or Sonnet model family.

Plan Allowance, as Anthropic describes it
Pro A five-hour session limit and a weekly limit across all models
Max 5x Five times the Pro plan's per-session allowance, plus a weekly limit and a separate Fable weekly limit
Max 20x 20 times the Pro plan's per-session allowance, plus a weekly limit and a separate Fable weekly limit
Team and seat-based Enterprise A per-seat allowance on a rolling five-hour window and a weekly window, shared with Claude chat and Cowork. Its size depends on the seat tier (Standard or Premium)
Usage-based Enterprise No per-seat usage limits; usage is billed by consumption at API rates

Sources: Pro plan, Max plan, Claude Code costs for Teams and Enterprise, Claude Code with a Team or Enterprise plan.

Anthropic's Help Center pages don't state these allowances as a fixed number of messages or tokens. How fast you use them depends on message and conversation length, attached files, the model, the effort level and the tools involved. Anthropic also says it may limit usage in other ways at its discretion, such as weekly and monthly caps or model and feature limits (Pro plan). Depending on your plan and seat tier, Fable requests can bill to usage credits instead of your plan's limits; the /model picker then shows "Requires usage credits" on the Fable row (model configuration).

Check your remaining Claude Code quota

  • /usage (aliases /cost and /stats) shows your plan usage bars and when each limit resets. On Pro, Max, Team and Enterprise it also shows what is using your limits (skills, subagents, plugins, individual MCP servers) with suggested fixes. Press d or w to switch between the last 24 hours and the last 7 days. The breakdown comes from session history on this machine, so usage from other devices or claude.ai isn't included (costs).
  • /status shows the version, model, account and which credential is active. If an ANTHROPIC_API_KEY variable is set, Claude Code uses that key instead of your subscription, and you pay API rates (Help Center).
  • Settings > Usage on claude.ai shows the session and weekly bars for all Claude products.
  • Warnings: before a window runs out, Claude Code shows a message such as You've used 85% of your session limit · resets 3:45pm. You can also put the rate_limits fields in a custom status line.

A note such as rate limited until 3:14am inside /usage only means Claude Code can't refresh the meters until then. It doesn't limit your work (costs).

What happens when you hit the limit

text
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
You've hit your Sonnet limit · resets 3:45pm

Claude Code blocks further requests until the reset time in the message. Your options:

  • Wait. In an interactive session signed in with a claude.ai plan, Claude Code v2.1.234 and later waits in the open session and continues the task after the reset (Continuing automatically at 3:45pm · esc to cancel). It doesn't start this wait on its own when the reset is more than 24 hours away, which is common for a weekly limit; pick Wait here, then continue automatically from /rate-limit-options instead. You can turn the behavior off with Continue automatically at usage limit in /config (interactive mode).
  • Switch model, but only for a model-family limit. The session and weekly limits are shared across all models, so /model doesn't restore access. For an Opus or Sonnet limit, switching to a model outside that family keeps you working. Each model has its own prompt cache, so the next request re-reads the whole conversation without cache hits.
  • Turn on usage credits. Run /usage-credits (previously /extra-usage). On Pro and Max it opens Settings > Usage on claude.ai; on Team and Enterprise it opens your organization's usage settings or sends a request to your admin. With usage credits on, requests past a plan limit continue at standard API rates until you reach your monthly spend limit or your balance runs out with auto-reload off (usage credits, costs).
  • Upgrade. Pro to Max 5x to Max 20x. Anthropic says a new plan's limits apply right away (usage and length limits); see the October 2026 report below about upgrades.
  • Use an API key instead. A Claude Console account is billed per token at API rates and has no five-hour or weekly window. API rate limits apply instead (section 2).

The monthly API credits that come with Max and Team plans can't be used in Claude Code or for usage credits (Help Center). Anthropic is also gradually rolling out a small wrap-up allowance: if the five-hour limit is reached in the middle of a response, Claude Code may finish the step in progress and show Usage limit reached · wrapping up. That usage counts toward your weekly limit.

Why usage climbs faster than you expect

Claude Code's cost docs list the usual reasons:

  • Every request sends the whole conversation. With prompt caching it is re-read at the cached token rate, but a one-line question in a session that has been open all day still draws usage for the whole conversation.
  • Your first message after a break longer than the cache lifetime misses the cache and reprocesses the full context.
  • /loop and other scheduled tasks, goal check-ins and messages from your other sessions start turns even while you're idle.
  • Every subagent and every agent teammate sends its own requests.
  • /compact reads the whole conversation it summarizes, so it is a large request itself. /clear costs nothing.

Reports from October 2026

Several users have opened issues on Anthropic's Claude Code GitHub repository saying the plan meters moved faster than their usage explains. These are user reports. Anthropic hasn't confirmed a cause, and as of October 27, 2026, none of these three threads has a reply from Anthropic staff:

  • #103376: a Max 20x user reports that the weekly meter went from 0% to 54% in the 22 hours after the weekly reset, with about the same Claude Code token volume as the same 22 hours of the previous week. Other commenters on Max plans and Team seats posted similar measurements.
  • #105015: a Pro user reports that the five-hour meter went from 0% to 100% in about three hours on October 25, and that it also happened on October 21, while their local Claude Code transcripts show no requests in those windows.
  • #105162: a user who upgraded from Max 5x to Max 20x on October 15 reports that the five-hour limit changed but the weekly limit didn't seem to be recalculated. Two commenters describe the same after mid-cycle upgrades.

If your meter looks wrong, compare /usage with Settings > Usage on claude.ai, check for other devices, Remote Control, background or cloud sessions and scheduled tasks on the same account, then contact Anthropic: sign in at claude.ai, click your initials and select Get help (costs).

2. API key usage: Anthropic rate limits by usage tier

If Claude Code is signed in with a Claude Console account or uses an ANTHROPIC_API_KEY, there are no five-hour or weekly windows. You pay per token, and your organization's rate limits and monthly spend cap apply.

Usage tiers and how limits are measured

  • Anthropic places each organization on a usage tier automatically, based on usage history and account standing: Evaluation (new organizations, with limits below the standard ones), Start, Build, Scale, and Custom (arranged with Anthropic).
  • Limits are set per organization, not per API key. All keys in an organization share them. You can set lower limits for individual workspaces.
  • Messages API limits are measured in requests per minute (RPM), input tokens per minute (ITPM) and output tokens per minute (OTPM) for each model class.
  • The API uses a token bucket: capacity refills continuously instead of resetting at fixed times. Limits can be enforced over shorter intervals, so 60 RPM may be enforced as 1 request per second, and short bursts can trigger errors.
  • For current models, only uncached input counts toward ITPM. Tokens read from the prompt cache don't.
  • OTPM counts the tokens actually generated. The max_tokens value you set doesn't count.
  • Your organization's tier and current limits are on the Rate limits page of the Claude Console.

Standard Messages API limits for current models (RPM / ITPM / OTPM):

Model Start Build Scale
Claude Opus 5.5 1,000 / 2M / 400K 5,000 / 5M / 1M 10,000 / 10M / 2M
Claude Sonnet 5.5 1,000 / 2M / 400K 5,000 / 5M / 1M 10,000 / 10M / 2M
Claude Haiku 5.5 1,000 / 2M / 400K 5,000 / 5M / 1M 10,000 / 10M / 2M
Claude Fable 5.x (Fable 5.1 and Fable 5 combined) 1,000 / 500K / 100K 2,000 / 1.5M / 300K 4,000 / 4M / 800K

Opus 5.5 and Sonnet 5.5 each have their own limit, separate from older Opus and Sonnet models. Monthly spend caps are $500 on Start, $1,000 on Build and $200,000 on Scale; Custom has no cap.

What a 429 looks like

A rate limit returns HTTP 429 with error type rate_limit_error and a message that says which limit was exceeded. When the response has a retry-after header, wait that many seconds before retrying. Headers such as anthropic-ratelimit-input-tokens-remaining and anthropic-ratelimit-output-tokens-reset show where you stand (response headers). A sharp jump in an organization's traffic can also cause 429s from acceleration limits, so increase traffic gradually.

Reaching the tier's monthly spend cap also returns a 429 rate_limit_error, but without retry-after. Retries keep failing until 00:00 UTC on the first day of the next month, unless you move to a higher tier:

json
{
  "type": "error",
  "error": {
    "type": "rate_limit_error",
    "message": "You have reached your API usage limits: your organization has crossed its monthly API usage threshold, set based on your organization's API tier. You will regain access on 2026-09-01 at 00:00 UTC.",
    "details": { "error_code": "enforced_spend_limit_reached" }
  },
  "request_id": "req_018EeWyXxfu5pfWkrYcMdjWG"
}

A spend limit you set yourself below the tier cap returns 400 invalid_request_error with a message starting You have reached your specified API usage limits.

In Claude Code, an API rate limit shows up as:

text
API Error: Request rejected (429) · this may be a temporary capacity issue. If it persists, check https://status.claude.com.

Claude Code has already retried temporary 429s, up to 10 times with exponential backoff, before you see this (automatic retries).

What to do about 429 errors

  • Respect retry-after. In Claude Code, CLAUDE_CODE_MAX_RETRIES sets the number of retries (default 10). For unattended CI jobs, CLAUDE_CODE_RETRY_WATCHDOG=1 keeps retrying 429 and 529 errors, but still fails at once on a spend-limit 429.
  • Lower concurrency. Run fewer parallel subagents, or use a smaller model with /model for high-volume scripted runs.
  • Keep prompt caching working. Claude Code caches automatically, and cache reads don't count toward ITPM on current models. Switching models mid-session starts a new cache.
  • Check the key. Run /status. A stray ANTHROPIC_API_KEY in your environment can send requests through a low-tier key.
  • Request a higher tier. Use Request tier increase on the Console Rate limits page. Anthropic support can also raise limits for urgent needs.
  • Size limits for a team. Claude Code's docs suggest planning per-user limits by team size, for example 200k–300k TPM and 5–7 RPM per user for 1–5 users, down to 10k–15k TPM and 0.25–0.35 RPM per user for 500+ users. These limits apply to the whole organization, so one person can use more while others are idle. A workspace rate limit on the Console's "Claude Code" workspace caps Claude Code's share and protects other production traffic (costs).

A 529 overloaded_error is a different problem: the API is busy for all users, and it doesn't count against your quota. See Claude API 529 overloaded_error: what it means and what to do.

3. Token limits: context window and output size

Current models, from Anthropic's models overview:

Model API ID Context window Max output (Messages API)
Claude Fable 5.1 claude-fable-5-1 1M tokens 128K tokens
Claude Opus 5.5 claude-opus-5-5 1M tokens 128K tokens
Claude Sonnet 5.5 claude-sonnet-5-5 1M tokens 128K tokens
Claude Haiku 5.5 claude-haiku-5-5 1M tokens 128K tokens

How this works in Claude Code (model configuration):

  • These models run with the 1M window by default. You don't need a [1m] suffix. Sessions auto-compact at about 967K tokens by default, and /autocompact sets a smaller window.
  • The [1m] suffix matters only for older models. Opus 4.6 and Sonnet 4.6 reach 1M only through [1m], and depending on the plan that requires usage credits. Otherwise you see API Error: Usage credits required for 1M context.
  • CLAUDE_CODE_DISABLE_1M_CONTEXT=1 keeps sessions at 200K.
  • Haiku 5.5 costs more per token when the prompt is longer than 100K tokens (pricing).
  • Opus 5.5 needs Claude Code v2.1.280 or later, Sonnet 5.5 v2.1.284, Haiku 5.5 v2.1.293 and Fable 5.1 v2.1.257. Run claude update if a model is rejected.

When the context is full, the request fails with Prompt is too long, which an interactive session shows as Context limit reached · /compact or /clear to continue. /context shows what fills the window and warns when you're over, for example Context exceeds the 200k-token limit by 94k tokens — run /compact or /clear to continue. A separate limit, Request too large (max 32MB), is about the raw request size in bytes, usually from images or attachments (error reference).

If a reply hits the output cap, you see API Error: Claude's response exceeded the ... output token maximum. Reply continue to get the rest, or ask for one file or section per reply. CLAUDE_CODE_MAX_OUTPUT_TOKENS raises the cap up to the model's maximum, but a higher value leaves less of the context window before auto-compaction. A request that Claude Code re-sends without streaming is limited to 64,000 output tokens.

Behind a gateway or with a model ID Claude Code doesn't recognize, Claude Code assumes a 200K window. For that case and the full set of fixes, see Claude Code "Prompt is too long": what it means and how to fix it.

The context window and your usage limits are different things. The context window limits one conversation; usage limits cap your total use over five hours and a week. They are connected, though: a larger context costs more usage on every request, because the whole conversation is sent each time.

4. Practical ways to make your limits last

These come from Claude Code's cost docs:

  • /clear between unrelated tasks. Run /rename first so you can find the session later with /resume.
  • /compact with a focus in long tasks, for example /compact Focus on code samples and API usage. Remember it is a large request itself.
  • Find what fills the context. Run /context, turn off MCP servers you don't use with /mcp disable <name>, keep CLAUDE.md short (the docs suggest under 200 lines) and move workflow-specific instructions into skills.
  • Match the model to the job. Sonnet handles most coding; keep Opus for complex reasoning; use model: haiku for simple subagent tasks.
  • Lower the effort level with /effort for routine work. Thinking tokens are billed as output tokens.
  • Avoid needless model switches mid-task, since each switch starts a cold cache.
  • Send verbose work to subagents, such as test runs and log processing, so only a summary returns to the main conversation. Their requests still count toward your usage.
  • Stop what you no longer need: /loop tasks, background sessions and agent teammates. Agent teams use about 7 times more tokens than a standard session when teammates run in plan mode.
  • Use the /usage suggestions. When the footer shows f to fix, press f to apply the ones Claude Code can (v2.1.305 or later).

Long-Term Solution 1: Route Through TeamoRouter

TeamoRouter provides unified quota management that fundamentally solves limit problems:

Unified Quota Management

Pool multiple API keys together. When one key hits its limit, TeamoRouter automatically switches to another.

Request Shaping

  • Rate smoothing: Spread requests evenly over time
  • Priority queuing: Critical requests go first, non-critical ones queue
  • Smart retries: Exponential backoff after hitting limits

Cache Reduces Calls

99.3% cache hit rate means most repeated requests never reach the Anthropic API — drastically reducing the chance of hitting limits.

Setup Steps

  1. Add multiple API keys in TeamoRouter console
  2. Configure priority and rotation policy
  3. Set request rate caps
  4. Configure budget and usage alerts
  5. Point Claude Code Base URL to TeamoRouter

How this interacts with a Claude plan: when Claude Code sends a TeamoRouter API key (ANTHROPIC_BASE_URL together with ANTHROPIC_AUTH_TOKEN), the key replaces your claude.ai login for those requests, so your plan's five-hour and weekly limits don't apply to them; they're billed to your TeamoRouter account instead. Setting only ANTHROPIC_BASE_URL without a key leaves your claude.ai login active, and your plan's limits and billing still apply (Claude Code gateway docs). Run /status to see which credential is active.

Long-Term Solution 2: Multi-Key Load Balancing

TeamoRouter includes built-in multi-key load balancing:

Feature Description
Auto round-robin Requests distribute evenly across keys
Priority routing Primary key first, fallback keys on limit
Health checks Auto-remove unhealthy keys
Usage stats Per-key consumption at a glance

A note on Anthropic's side: Anthropic sets rate limits and spend caps per organization, so API keys from the same Anthropic organization share one set of limits, and workspaces can have lower caps of their own (rate limits). Spreading traffic over several keys from one organization doesn't raise that organization's ceiling.

Example Configuration

In the TeamoRouter console:

yaml
keys:
  - key: sk-ant-xxx1
    weight: 3
    tier: primary
    daily_limit: $100
  - key: sk-ant-xxx2
    weight: 1
    tier: secondary
    daily_limit: $50
  - key: sk-ant-xxx3
    weight: 1
    tier: fallback
    daily_limit: $30

Team Quota Management

Shared Quota Pool

  • One team account with multiple members
  • Unified quota pool
  • Per-member sub-quotas

Usage Reports

  • By member, project, or time period
  • Auto-generated weekly/monthly reports
  • Real-time alerts on abnormal consumption

Budget Control

  • Team-level total budget cap
  • Per-member individual quotas
  • Auto-throttle when thresholds are exceeded

FAQ

How do I get higher Claude Code limits?

On a Claude plan, upgrade (Pro to Max 5x to Max 20x) or turn on usage credits with /usage-credits to keep working past a limit at standard API rates. On Team and Enterprise, admins choose seat tiers and set usage-credit spend limits. With an API key, use Request tier increase on the Claude Console Rate limits page, or contact Anthropic support for urgent needs. Organizations also move to higher tiers automatically as they build usage history.

Does a 529 Overloaded error count against my quota?

No. A 529 means the API is at capacity across all users. It doesn't count against your usage limits (error reference). Try again in a few minutes or switch models with /model.

Does switching models help when I hit a limit?

Only for a model-family limit (You've hit your Opus limit or You've hit your Sonnet limit). The five-hour session limit and the weekly limit are shared across all models, so switching models doesn't restore access.

How does TeamoRouter multi-key load balancing work?

Add multiple API keys in TeamoRouter console with weight and priority settings. The system handles load balancing and failover automatically. See the Claude Code setup guide for details.

How should teams manage Claude Code quotas?

Create a team account through TeamoRouter, configure a unified quota pool with per-member limits, and manage with usage reports.

Can caching solve rate limit issues?

Yes. Caching reduces the number of actual Anthropic API calls, reducing the probability of hitting rate limits. TeamoRouter's 99.3% cache hit rate dramatically cuts API call volume. On Anthropic's side, prompt caching also helps directly: for current models, tokens read from the prompt cache don't count toward the input-tokens-per-minute (ITPM) limit (rate limits). On a Claude plan, cached history still counts toward your usage, at the cached token rate.

Ready to connect?Log in · top up · create an API key — three steps to start.