Claude Code Rate Limit & Usage Limit — How to Fix It
“You’ve reached your usage limit” and “rate limit” look the same in the terminal but mean different things depending on how Claude Code is signed in. This guide shows how to tell a Pro/Max subscription cap apart from an API 429 rate limit, and the right fix for each — without wasting money on the wrong one.
What does a Claude Code “usage limit” actually mean?
Claude Code can be authenticated two ways, and “limit” means something different for each. Getting this wrong is why people pay for an upgrade that does not unblock them:
- Claude Pro / Max subscription: usage is capped per rolling time window — a short window on the order of a few hours, plus overall weekly caps on Max. When you hit it, you must wait for the window to reset. Spending more money will not instantly unblock the current window.
- Anthropic API key (pay-as-you-go): limits are standard API
429rate limits — requests and tokens per minute tied to your usage tier, which rises as your account spends more. You slow down, back off, or raise your tier.
Both of those are about your allowance. Do not confuse them with a 529 “overloaded” error, which is Anthropic-wide capacity and has nothing to do with your limit. Here is how the signals compare:
| Signal | What it means | Fix |
|---|---|---|
| Pro/Max usage limit | Rolling time-window cap on your subscription is spent | Wait for the window reset, or upgrade Pro → Max |
| 429 | API-key requests/tokens per minute exceeded for your tier | Slow down, back off, raise usage tier |
| 529 | Anthropic servers overloaded — not your limit | Retry with backoff, check status |
| 401 | Session or token expired / invalid | Re-login with /login |
The decisive question is how Claude Code is signed in. A subscription limit is a clock you wait out; an API 429 is a throughput ceiling you back off from or raise. Everything below assumes you have first confirmed which one you are on.
5 steps to fix Claude Code limit errors
Rule out an Anthropic outage first
Before assuming you hit your own cap, confirm Anthropic itself is healthy. During an incident, error messaging can be misleading and a retry a few minutes later may simply work.
Where to check
- Open prismix.dev/service/anthropic — active incidents appear at the top, updated every 5 minutes.
- Cross-check status.anthropic.com for Anthropic’s own incident page.
- If both are green, the limit is almost certainly yours — continue to step 2.
Identify which limit you are hitting
This is the step everyone skips — and it decides the fix. Run /status inside Claude Code to see how you are authenticated, then read the wording of the limit message:
# Inside Claude Code
/status # shows your account, auth method (subscription vs API key), and model - Signed in with a Claude Pro / Max account, and the message mentions a usage limit or a reset time → you are on a subscription limit (go to step 3).
- Using an ANTHROPIC_API_KEY, and the message mentions rate limit or
429→ you are on an API rate limit (go to step 5). - Not sure which key is active?
/statusand your shell’secho $ANTHROPIC_API_KEYtell you whether an API key is set in the environment.
Subscription limit: wait for the reset or raise the cap
On Pro or Max, the limit is a rolling time window, not a balance you can top up. Your options, in order:
- Wait for the window to reset. The message usually states when. A short window recovers in a few hours; a weekly cap (Max) recovers when the week rolls over.
- Upgrade Pro → Max for materially higher caps. Note this raises future windows — a window you have already exhausted still resets on its own clock, so upgrading is not an instant unblock.
- Spread heavy work out. Break large refactors or codebase-wide tasks into batches across windows instead of one marathon session that drains the window in minutes.
- Need headroom right now? Switch Claude Code to an Anthropic API key (pay-as-you-go). You will be billed per token, but you are no longer bound to the subscription window — then step 5 applies instead.
Exact window lengths and amounts change over time and by plan, so treat the reset time in the message as authoritative rather than any fixed number you read online.
Reduce token burn so you hit the limit less
Whichever limit you are on, a bloated context is what drains it fastest — every turn re-sends the whole conversation. Trim it and each request costs less:
# Inside Claude Code
/compact # summarize & shrink the running conversation context
/clear # start fresh when the task changes entirely
@src/only/what/i/need.ts # scope @-file context tightly, not whole folders - Run
/compactoften on long sessions — it replaces a huge transcript with a summary so later turns carry far fewer tokens. - Scope
@-file context tightly. Attach the specific files you need, not entire directories, and avoid re-reading large files you have already seen. - Prefer a lighter model for routine or mechanical steps and reserve the heaviest model for the hard reasoning — big contexts on a big model eat the limit fastest.
- Avoid dumping build logs or huge JSON into the chat; point Claude at a file or a filtered command instead.
API-key mode: raise your tier and back off
If /status shows an API key and you are seeing 429, you have hit requests-per-minute or tokens-per-minute for your usage tier. Two levers:
- Raise your usage tier. Tiers unlock with historical spend and grant higher per-minute limits. Check yours at console.anthropic.com/settings/limits.
- Let backoff do its job. Claude Code and the official SDKs already retry
429with exponential backoff. You mostly just need to not fight it.
For your own scripts that call the Anthropic API directly (outside Claude Code), add explicit exponential backoff with jitter so a burst of 429s does not fail the whole job:
// Node — retry Claude API 429 rate limits with exponential backoff
import Anthropic, { APIError } from '@anthropic-ai/sdk';
const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
async function withBackoff(fn, maxAttempts = 6) {
for (let attempt = 0; attempt < maxAttempts; attempt++) {
try {
return await fn();
} catch (e) {
const retriable = e instanceof APIError && (e.status === 429 || e.status === 529);
if (!retriable || attempt === maxAttempts - 1) throw e;
const wait = Math.min(60_000, 2 ** attempt * 1000 + Math.random() * 1000);
console.warn(`Claude API ${e.status} — retry ${attempt + 1} in ${(wait / 1000).toFixed(1)}s`);
await new Promise(r => setTimeout(r, wait));
}
}
}
// Usage
const msg = await withBackoff(() => client.messages.create({
model: 'claude-3-5-haiku-20241022',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello' }],
})); Get an email the next time Anthropic goes down
Outage alerts for Anthropic, straight to your inbox. No account needed, unsubscribe in every email.
Watching more than one service? A free account covers 5 services + a daily digest — and Pro is currently free.
FAQ
Why did Claude Code stop mid-task with a usage limit?
Because the account behind the session ran out of allowance mid-run. On Pro/Max, a long agentic task can burn through the current rolling window’s budget and halt until it resets. On an API key, the same wording usually means a 429 rate limit — too many tokens per minute for your tier. The message normally states which one and when it clears.
Does paying more remove the Pro/Max limit immediately?
No. Subscription limits are window-based, not a balance you top up. Upgrading Pro to Max raises the caps for future windows, but a window you have already exhausted still resets on its own schedule. For instant pay-as-you-go headroom, switch Claude Code to an Anthropic API key instead.
How do I see my remaining usage?
Run /status inside Claude Code — it shows your account, auth method, and model. The limit message itself usually states the reset time. API-key rate limits and your usage tier live at console.anthropic.com/settings/limits.
Subscription limit vs API rate limit — which am I on?
It depends on how Claude Code is authenticated. A Claude Pro/Max login means a subscription usage limit (time-window based — wait or upgrade). A configured ANTHROPIC_API_KEY means standard API 429 rate limits (per-minute, tier-based — slow down or raise tier). Run /status to confirm.
Is the 5-hour reset the same as the weekly limit?
No. On Max there are two separate caps that both apply: a short rolling window (a few hours) that resets frequently, and a broader weekly cap on top of it. You can clear the short window in hours yet still be held by the weekly cap until the week rolls over. Durations change over time, so trust the reset time shown in the message.