Three failure classes, three responses
Claude API failures fall into permanent (4xx — your bug, do not retry), transient (5xx, 529 — retry with backoff), and rate-limited (429 — retry per retry-after). The SDK handles auto-retry up to its budget; beyond that you decide.
Circuit breakers for upstream outages
If Claude's API is degraded, retrying immediately makes things worse. A circuit breaker that opens after N consecutive failures, holds open for a cool-down, then half-opens to test recovery, prevents your service from amplifying outage. Pair with a fallback (Haiku, Sonnet on Bedrock, queued retry).
cwkPippa lives with about 4 hours/day of degraded
Real-world Claude availability is high but not perfect. cwkPippa's memory rule: ~4h/day of degraded service is normal. The fallback chain (Codex → Claude → Gemini) is a v1 must-have, not a v2 nice-to-have. Production designs assume the upstream will fail; the question is how gracefully.