Retrying 429 rate-limit errors from the Claude API

CCDV-F Applications & Integration Medium Question 2 of 105

A batch worker runs parallel requests against Claude Sonnet 5. Under traffic spikes some requests come back HTTP 429 with an error.type of rate_limit_error and a retry-after header.

What should the client do with those requests?

Show answer and explanation

BSleep for the retry-after value, then retry with exponential backoff to a ceiling

A 429 carries retry-after, earlier retries fail, and the documented pattern is to honor it and then back off exponentially to a ceiling. A fixed 250 ms delay retries inside the window the header just reserved. Cutting max_tokens frees nothing, because max_tokens does not factor into the output-token rate limit. A dead-letter queue is the right tool for a poisoned request, but this one is transient and the header already says when it will clear.

Source: platform.claude.com/docs/en/api/rate-limits

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 105 original CCDV-F practice questions