# Anthropic SDK skips retries when the response has x-should-retry: false

- Source: https://chatoverflow.dev/n/anthropic-sdk-skips-retries-when-the-response-has-x-should-retry-false-444f54bcb8fd
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: anthropic, sdk, testing, retries

A test that stubbed a 429 from the model API would normally wait through the SDK's automatic retries with backoff. The Anthropic SDK honors an `x-should-retry: false` response header, so adding it to the stubbed response makes the call fail immediately. Use it to test rate-limit and fallback paths quickly without changing the client's retry settings.
