All articles
AIClaudeOpenAI

Claude Code 429 Errors: A Simple Quick Reference for Claude Code and Codex

A Claude Code 429 can be your Pro/Max session limit, your API key's rate limit or a monthly spend cap, and each needs a different fix. Exact messages, headers to read, what Claude Code retries, and how Codex splits rate limits from insufficient_quota.

Claude Code 429: a pale blue turnstile with three marbles waiting in line next to a light green hourglass
Also available in中文Español

A Claude Code 429 means a limit said no, and the first job is to work out which limit. On a Pro or Max plan it’s usually your five-hour session limit or your weekly limit, and Claude Code shows “You’ve hit your session limit” with a reset time. With an API key it’s the rate limit of your key or organization, shown as “Request rejected (429)”. Codex has the same split between a ChatGPT plan limit, a short rate limit and an empty API balance. Below is a quick reference for both tools: the exact messages, the headers worth reading, and what to do in each case. Everything comes from official docs or the tools’ own source code, and it’s all linked.

What a Claude Code 429 actually means

HTTP 429 means “Too Many Requests”. On the Claude API it comes with the error type rate_limit_error, and the Claude API errors page lists three causes: your organization hit a rate limit, it reached its usage tier’s monthly spend cap, or it reached a spend limit on the Claude Code workspace.

Claude Code adds one more source that matters to most people, which is the subscription. If you sign in with a Pro or Max account, you have a five-hour session limit and a weekly limit, and Anthropic’s support article on Pro and Max says these limits are shared across Claude and Claude Code. When one runs out, the server answers with a 429 that carries your plan’s quota headers, and Claude Code turns it into a readable message instead of a raw code.

Claude Code 429 in the Claude API docs: rate_limit_error, monthly spend cap without retry-after, and 529 overloaded_error

Every Claude Code 429 message and what to do

These are the messages listed in the Claude Code error reference, grouped by what’s behind them.

MessageWhat’s behind itWhat to do
You’ve hit your session limit · resets 3:45pmYour Pro or Max five-hour session limitWait for the reset time, or use usage credits
You’ve hit your weekly limit · resets Mon 12:00amYour weekly limitSame, but the wait can be days
You’ve hit your Opus limit / Sonnet limitA limit for one model familySwitch to a model outside that family with /model
Request rejected (429)The rate limit of your API key, Amazon Bedrock project or Google Cloud projectRun /status, check your tier, run fewer agents at once
Server is temporarily limiting requests (not your usage limit)A short throttle on Anthropic’s sideWait briefly and try again

A few details from the docs are easy to miss. The session and weekly limits are shared across all models, so /model doesn’t help with them, while the Opus and Sonnet limits only apply to one family. /usage shows your limits and reset times, and /usage-credits lets you buy more usage on Pro and Max. If you’d rather not babysit the reset, Claude Code v2.1.234 and later can wait in the open session and continue on its own, and the CLI setting for that sits in /config as “Continue automatically at usage limit”.

The one I see people trip over most is “Request rejected (429)” on a paid subscription. The docs point to the cause directly: “A stray ANTHROPIC_API_KEY in your environment can route requests through a low-tier key instead of your subscription.” Run /status, check which credential is active, and unset the variable if you didn’t mean to use it.

If you want the full list of Claude Code errors beyond 429, I keep one in my Claude Code errors lookup. How the session and weekly limits are counted is covered in Claude usage limits explained.

Claude Code 429 and Codex 429 messages with what each one means and what to do

Which headers to read on a Claude Code 429

If you call the API yourself, or you run Claude Code with an API key and want to know how close you are, the response headers tell you more than the error body. The Claude rate limits page documents these:

HeaderWhat it tells you
retry-afterHow many seconds to wait before retrying. Not every 429 has it, and the spend-cap 429 never does.
anthropic-ratelimit-requests-remainingRequests left before you’re limited
anthropic-ratelimit-tokens-remainingTokens left, rounded to the nearest thousand, for the most restrictive limit in effect
anthropic-ratelimit-input-tokens-remaining / -output-tokens-remainingInput and output tokens left
anthropic-ratelimit-*-resetWhen that limit is fully replenished, as an RFC 3339 time

Two things are worth knowing about how these limits work. The API uses a token bucket, so capacity refills continuously rather than resetting at a fixed time. And limits are counted in requests per minute, input tokens per minute and output tokens per minute for each model class, so a 429 can come from tokens even when you’ve sent few requests. You can see your organization’s limits on the Rate limits page in the Claude Console.

The spend cap is the case where waiting doesn’t help. Each tier has a monthly cap ($500 for Start, $1,000 for Build and $200,000 for Scale), and once you reach it, usage pauses until 00:00 UTC on the first day of the next month. The response is still a 429 rate_limit_error, but it has no retry-after header and the body has enforced_spend_limit_reached as its error code. Retrying, including the SDK’s automatic retries, fails until access resumes.

Claude Code 429 response headers to read: retry-after, anthropic-ratelimit-* and OpenAI x-ratelimit-*

What Claude Code retries for you

Claude Code retries “temporary 429 throttles” with exponential backoff before you see anything, up to 10 times by default. On a claude.ai subscription it also retries 429s that don’t carry your plan’s quota headers, from v2.1.199 onward. It doesn’t retry a real plan limit, because that won’t clear until the reset time, and it doesn’t retry a gateway’s spend-limit 429. If you set a fallback model, that doesn’t help either, since the model configuration docs say rate-limit errors never trigger a fallback.

For unattended runs such as CI, CLAUDE_CODE_RETRY_WATCHDOG=1 makes Claude Code retry 429 and 529 capacity errors indefinitely. Since v2.1.239 it fails immediately on spend and credit 429s rather than retrying them forever.

Codex 429: rate limit vs insufficient_quota

Codex shows different text depending on what the server sent back with the 429. I read the error handling in the open-source Codex CLI, and it splits 429s like this:

What the server sentWhat Codex showsWhat to do
usage_limit_reachedYou’ve hit your usage limit, with a reset time when one is knownCheck /status, wait for the reset, buy credits or use an API key
usage_not_includedTo use Codex with your ChatGPT plan, upgrade to PlusYour plan doesn’t include Codex
insufficient_quota, credit_balance_exhausted or a spend-limit codeQuota exceeded. Check your plan and billing details.Add credits or raise the limit. Retrying won’t help
Any other 429exceeded retry limit, last status: 429 Too Many RequestsWait, run fewer sessions in parallel

The first row is your ChatGPT plan. OpenAI’s Codex pricing page says Plus and Business have a five-hour limit, “Pro plans currently have no five-hour limit”, and weekly limits may also apply. When you run out, Plus and Pro users can buy credits, and anyone can keep working locally with an API key at API rates.

The third row is billing. OpenAI’s API error codes page lists separate codes for an empty prepaid balance and for organization or project spend limits, and notes that the broader error type “can still be insufficient_quota“. It also says “retrying billing, spend, or quota errors won’t restore API access”. So if Codex says “Quota exceeded”, go to billing instead of waiting.

The last row is the plain rate limit. Codex retries HTTP requests 4 times by default (request_max_retries in the config reference) before it gives up with that message. OpenAI’s rate limits guide says Retry-After may be present on temporary 429s and should be treated as a minimum wait, with some jitter added. The x-ratelimit-remaining-requests, x-ratelimit-remaining-tokens and matching x-ratelimit-reset-* headers tell you how much is left and when it resets. OpenAI also has a ramp-up 429 with the code slow_down, which means your request rate rose too quickly.

Claude Code 429 vs Codex 429: rate limit, plan limit, insufficient_quota and overload compared

When it isn’t a 429 at all

Two errors look similar but have nothing to do with your limits. On Claude, a 529 overloaded_error means Anthropic is short of capacity for that model. It doesn’t count against your quota, and switching models with /model often fixes it. I covered it in Claude Code 529 Overloaded. On Codex, the equivalent is a 503, which Codex shows as “Selected model is at capacity”. That one is in Selected model is at capacity in Codex.

When the 429 doesn’t match your usage

Sometimes the numbers don’t add up, and there are open reports from both tools. In Claude Code issue #96872 from September 2026, a user logged 195 rate_limit_error records while their session and weekly usage showed 27% and 26%, with around six sessions running. On the Codex side, issue #57072 from October 26, 2026 reports 429s with 99% of the weekly limit left, and signing in again fixed it for that user, at least for a while.

If that’s you, check /status in either tool first, close the extra sessions, and sign in again. If the numbers still don’t match, file a report with the request ID. Claude returns it in the request-id response header, and Codex prints it at the end of the retry-limit message when it has one. Neither company has said how parallel sessions count toward these throttles, so I wouldn’t assume more sessions are free.

If you’re still choosing between the two tools, I compared their pricing and limits in Claude Code vs Codex.

Claude Code 429 FAQ

Does switching models fix a Claude Code 429?

Only for the Opus or Sonnet family limits. The session and weekly limits are shared across all models, so /model won’t get you past those.

How long do I wait after a Claude Code 429?

Use the reset time in the message. For an API 429, use retry-after if it’s there. If it’s a tier spend cap, there’s no retry-after and it lasts until 00:00 UTC on the first of next month unless you get a higher limit.

Why do I get 429 on Max when I barely used anything?

Run /status and check whether an ANTHROPIC_API_KEY is set in your environment, because Claude Code would then use that key instead of your plan. If the subscription is active and it still happens, it’s likely a short server throttle or one of the bugs above.

Will retrying fix a Codex “Quota exceeded” error?

No. OpenAI says retrying billing, spend or quota errors won’t restore access. Add credits or raise the spend limit first.

Leave a thought

Your email address will not be published.