◉CLAUDE LABJP
●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
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 API128rate limit4295retry7production111

✦ 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-10-16
Sending 40 Rows From Make to the Claude API Stops at Row 14 — Avoiding the 429 With One Subtraction
Why a no-code automation that sends spreadsheet rows to the Claude API one by one hits a 429 partway through, and how to fix it. Seven spacing strategies tested on a mock bucket, a formula for the Sleep delay, and settings that stop failed rows from vanishing.
⬡ API & SDK2026-05-24
Archiving Claude API Responses to Cloudflare R2: An Implementation Memo for Audit, Replay, and Incident Analysis
An implementation memo on persisting Claude API requests and responses into Cloudflare R2 so you can audit, replay, and triage production incidents — covering Workers waitUntil patterns, PII masking, and a D1 metadata index for fast lookups.
⬡ API & SDK2026-04-24
Running the Claude API in Python Production — Rate Limits, Retries, and Timeouts
If you put Claude API into a real backend service, how you handle 429, 503, and read timeouts decides your reliability ceiling. This is the design I settled on after operating it in production.