CLAUDE LABJP
FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as OctoberFORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
Articles/API & SDK
API & SDK/2026-03-29Intermediate

Claude API 429 Errors in Production: Lessons from Six Parallel Content Pipelines

When Claude API starts returning 429 Too Many Requests, the official exponential-backoff snippet alone is rarely enough. Drawing on six content pipelines run by one indie developer, this guide covers the real failure modes I have observed, working Python and TypeScript retry implementations with jitter, a token-bucket throttle, and concrete criteria for moving jobs to the Batch API.

Claude API115rate limit4293retry7production111

Premium Article

Around dusk, the scheduled task that pushes content through Claude API across six of my sites would sometimes start returning 429 Too Many Requests in a tight cluster, leaving half of the day's automated publishing stuck. I run six content sites in parallel, where the API handles article generation, integrity checks, and SEO reports all day long, and I also lean on Claude API in my own app work for tasks like report aggregation and image classification.

After hearing the same complaint several times — "I copied the exponential backoff from the docs but 429s keep coming" — I decided to write down the code that actually runs in my pipelines and the metrics I have observed. The first version I wrote, which trusted only the Retry-After header, broke quickly. The header was shorter than reality in some cases, missing in others, and synchronized retries would burst all at once. Each of those needed a different fix.

Three Independent Limit Axes You Must Track Together

Claude API rate limits act on three independent axes simultaneously. Cross any single axis and you get 429.

  • RPM — requests per minute
  • TPM — tokens per minute (input prompt + max_tokens)
  • TPD — tokens per day

The axis that bit me first was TPM. I had naively reasoned, "one request per second is well under the RPM limit, so we're fine," but a long-form MDX generation can consume 8,000 to 12,000 tokens per request, and I would hit the TPM ceiling before the RPM one. A useful rule of thumb: if you are pushing past 50% of your RPM budget, you are almost certainly going to hit TPM first.

The response always carries headers like this:

RateLimit-Limit-Requests: 50
RateLimit-Limit-Tokens: 90000
RateLimit-Remaining-Requests: 35
RateLimit-Remaining-Tokens: 72000
RateLimit-Reset-Requests: 2026-03-29T22:05:00Z
RateLimit-Reset-Tokens: 2026-03-29T22:05:00Z
Retry-After: 15

Retry-After is in seconds, while *-Reset-* are absolute ISO8601 timestamps. As we'll see below, the two disagree slightly during high load, and your design needs to absorb that.

429 Distribution Observed Across Six Pipelines

Here is the breakdown of 429s in my environment over the past 90 days, from roughly 180,000 requests.

  • Overall 429 rate: about 0.42% (down from about 4.1% before the fix)
  • RPM-driven: about 12% of all 429s
  • TPM-driven: about 71% of all 429s
  • Overloaded-adjacent 429s: about 17%
  • Retry-After median: 8 seconds; 95th percentile: 38 seconds
  • Recovers on the first retry: about 78%; within three retries: about 96%

The "4.1% before the fix" number came from the naive "sleep Retry-After and try again" implementation. It was painful to look at. After adding jitter and a token bucket, it dropped by an order of magnitude.

By time-of-day, the bursts cluster in 02:00–04:00 and 11:00–15:00 JST — the same windows where my scheduled tasks run heaviest. Spreading those off-peak is the next round of improvement.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Real 429 distribution from 180k requests across six parallel content pipelines, including Retry-After window-edge collisions
Working Python and TypeScript retry implementations with positive jitter, idempotency keys, and a self-imposed token-bucket throttle
Decision criteria that took the 429 rate from 4.1% to 0.04% by selectively moving jobs to the Batch API
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-07-12
Designing Around Claude API 413 request too large — Preflight Sizing and Splitting
Pack too much text, images, and tool_result into one request and Claude API rejects it with 413 request too large. Here is a code-backed design for measuring request bytes before you send, telling the two kinds of 413 apart, and splitting requests without breaking them.
API & SDK2026-07-07
When Claude API Suddenly Starts Returning 429 in Production — Field Notes on Measuring Rate-Limit Headroom from Headers and Throttling Before You Run Dry
Scrambling to add retries after a 429 is always a step behind. Claude API writes how much you have left into every response header. These are field notes on measuring that headroom continuously and throttling yourself before it runs out.
API & SDK2026-06-30
The Same 429 Wears a Different Face on Each Route: Running Claude Safely over Anthropic Direct and Azure Foundry
With Claude now generally available on Microsoft Foundry, a two-route setup is realistic even for solo developers. Here is how to fold the route-by-route differences in 429s and retry-after into one normalized error type and a single backoff policy.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →