- Symptom
- 429 rate_limit_error: You have reached your API usage limitserror.details.error_code: enforced_spend_limit_reachedNo retry-after header, and the SDK's automatic retries fail every time
- Cause
- When an organization crosses the monthly usage threshold for its tier, the API answers with the same error type as a rate limit, but access stays blocked until the reset time in the message or a tier change.
- Fix
- Read error.details.error_code before backing off. On enforced_spend_limit_reached stop retrying, alert someone, and raise the tier or the spend limit in the Console.
- Apply
except anthropic.RateLimitError as e: code = ((e.body or {}).get("error") or {}).get("details", {}).get("error_code") if code == "enforced_spend_limit_reached": raise SystemExit("Claude API spend limit reached, retries will not help") raise- Affected
- Claude Messages API, as of 2026-10
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders