← All guides

Claude Code rate limit: what a 429 means and how to fix it

A rate limit caps how fast you can call the API, not how much you can use overall. Here is why coding agents hit it and how to get moving again.

A 429 too many requests means you sent calls faster than your account is allowed to per minute, measured in requests or tokens. Wait a few seconds, retry with exponential backoff, slow the agent down, shrink the request, or route through a gateway that retries for you. This is separate from your plan's total usage limit.

If Claude Code stops with a 429 error, a rate limit exceeded message, or too many requests, you are being throttled. This is not the same as running out of your plan's usage. A rate limit controls how fast you can send calls in a short window. When an agent fires a burst of requests, it can trip that cap even though you have plenty of usage left for the day. The good news is that a 429 is almost always temporary and recoverable.

Rate limit vs usage limit

A rate limit is about speed. The API allows a certain number of requests per minute and a certain number of tokens per minute for your tier. Go over either in that short window and you get a 429. It clears on its own after a short wait. A usage limit is about total volume, for example how much you can spend or consume across a billing period or a plan window. When you hit a usage limit you are blocked until the period resets or you upgrade. A 429 too many requests is a rate limit. A message about your plan or quota being used up is a usage limit. The fixes are different, so read the error text before reacting.

Why coding agents hit it

Rapid tool loops

An agent reads a file, calls the model, edits, calls again, and repeats. That loop can send many requests in a few seconds and cross the per minute request cap.

Parallel calls

Running several tool calls or subagents at once multiplies your requests per minute quickly, even if each one is small.

Large requests

Big prompts with lots of context, long files, or full histories burn tokens per minute fast, so you can hit the token cap even with few requests.

Low tier limits

New or lower tiers have smaller per minute allowances. The same workload that is fine on a higher tier can throttle on a lower one.

Retry storms

Retrying immediately after a 429 without waiting sends more traffic into the same full window and keeps you throttled.

How to fix it

  1. Wait and retry with backoffPause a few seconds, then retry. If it fails again, double the wait each time. Most 429s clear within a short window. If the response includes a retry-after value, honor it.
  2. Slow the agent downReduce how many tool calls or subagents run in parallel. Serial work sends fewer requests per minute and is less likely to trip the cap.
  3. Shrink the requestTrim context, avoid resending whole files or long histories, and split very large tasks into smaller steps. Lower tokens per minute means fewer token rate limit hits.
  4. Raise your tier limitsHigher API tiers get larger per minute allowances. If you consistently hit the cap under normal load, moving up a tier raises the ceiling.
  5. Spread across keys or accountsRate limits apply per account or key. Distributing heavy workloads across more than one key raises your effective throughput. Follow the provider's terms when doing this.
  6. Switch model or providerIf one model or provider is throttling you, route the same task to a different model. A model-agnostic agent lets you swap without rewriting your workflow.
attempt = 0
max_attempts = 6
base_delay = 1 second

loop:
  response = send_request()

  if response.status != 429:
    return response          // success or a different error

  if attempt >= max_attempts:
    fail("still rate limited after retries")

  // honor server hint if present, else exponential backoff
  wait = response.retry_after or (base_delay * 2 ^ attempt)
  wait = wait + small_random_jitter   // avoid retry storms

  sleep(wait)
  attempt = attempt + 1
  continue
Add a little random jitter to each backoff wait. If many requests all retry at the exact same moment, they refill the window together and get throttled again.

Let the gateway handle retries

Wuwei is a free, open source coding agent that is model-agnostic, so a rate limit on one provider does not have to stop you. You can switch models, bring your own key, run a local model, or use free hosted models. If you route through Wuwei's hosted gateway, it handles routing and auto-retries for you, and it can fall back across routes when one is throttled. This does not make rate limits disappear, no tool can promise that, but it means a single 429 is retried and rerouted instead of failing your task. Download at /en#download.

FAQ

What does rate limit exceeded mean in Claude Code?

It means you sent calls faster than your account is allowed to in a short window, measured in requests per minute or tokens per minute. The agent's rapid tool loops or parallel calls usually caused the burst. It is temporary and clears after a short wait.

How long should I wait after a 429?

Start with a few seconds. If it fails again, double the wait on each try. If the response includes a retry-after value, use that. Most rate limits clear within a short window, so backing off and retrying is usually enough.

How do I avoid Claude rate limits?

Reduce parallel calls, keep requests smaller by trimming context, retry with exponential backoff and jitter instead of hammering, raise your API tier for a larger allowance, or route across more than one key or model.

Is a rate limit the same as a usage limit?

No. A rate limit caps how fast you can call the API and clears on its own after a short wait. A usage limit caps how much you can use over a billing or plan period and stays blocked until it resets or you upgrade. A 429 is a rate limit.

A rate limit is a speed bump, not a wall. Back off, retry, slow the agent, and shrink the request, and most 429s pass quickly. If you want a setup that reroutes and retries for you across models, Wuwei is free and open source and lets you bring your own key, run local, or use free hosted models. Download at /en#download.

Windows · macOS · Linux — free, no login