Anthropic Incident Runbook
Severity Classification
| Severity |
Condition |
Response Time |
| P1 |
API returning 500/529 for all requests |
Immediate |
| P2 |
Rate limiting (429) or high latency (>10s p99) |
15 minutes |
| P3 |
Intermittent errors (<5% error rate) |
1 hour |
| P4 |
Degraded quality (not errors) |
Next business day |
Immediate Triage (First 5 Minutes)
# 1. Check Anthropic status page
curl -s https://status.anthropic.com/api/v2/status.json | python3 -c \
"import sys,json; d=json.load(sys.stdin); print(d['status']['indicator'], '-', d['status']['description'])"
# 2. Test API connectivity
curl -s -w "\nHTTP %{http_code} | Time: %{time_total}s\n" \
https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-haiku-4-20250514","max_tokens":8,"messages":[{"role":"user","content":"1"}]}'
# 3. Check rate limit headers
curl -s -D - https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-haiku-4-20250514","max_tokens":8,"messages":[{"role":"user","content":"1"}]}' \
2>/dev/null | grep -i "ratelimit\|retry-after\|request-id"
Decision Tree
API returning errors?
├── 401/403 → Key issue → Check ANTHROPIC_API_KEY is set and valid
├── 429 → Rate limited → Check headers, reduce traffic, wait for retry-after
├── 500 → Server error → Check status.anthropic.com, retry with backoff
├── 529 → Overloaded → Temporary, retry after 30-60s
└── Timeouts → Network or long generation → Increase timeout, check max_tokens
Mitigation Actions
Rate Limiting (429)
# Immediate: reduce traffic
# 1. Enable circuit breaker
# 2. Queue non-critical requests
# 3. Switch to Message Batches for bulk work
# 4. Reduce max_tokens to shorten generation time
API Outage (500/529)
# Graceful degradation
def get_response_with_fallback(prompt: str) -> str:
try:
msg = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": prompt}]
)
return msg.content[0].text
except (anthropic.InternalServerError, anthropic.APIStatusError):
return "Our AI assistant is temporarily unavailable. Please try again shortly."
Key Compromise
# 1. Immediately revoke key at console.anthropic.com
# 2. Generate new key
# 3. Deploy new key to all environments
# 4. Audit recent usage for unauthorized calls
# 5. File incident report
Postmortem Template
## Incident: [Title]
- **Duration:** [start] to [end]
- **Severity:** P[1-4]
- **Impact:** [what users experienced]
- **Root Cause:** [what went wrong]
- **Detection:** [how we found out]
- **Mitigation:** [what we did to fix it]
- **Request IDs:** [from debug logs]
- **Action Items:**
- [ ] [preventive measure 1]
- [ ] [preventive measure 2]
Error Handling
| Symptom |
Likely Cause |
Quick Fix |
| All requests fail 401 |
Key rotated/expired |
Check Console for active keys |
| Sudden 429 spike |
Traffic burst or tier change |
Check rate limit headers |
| Slow responses (>10s) |
Large max_tokens or complex prompt |
Reduce max_tokens, use Haiku |
| Intermittent 500s |
Upstream API issue |
Check status.anthropic.com |
Overview
This runbook provides a bounded, evidence-driven response to Claude API outages, throttling, latency, key compromise, and degraded behavior. It separates provider diagnosis from application containment and requires a reversible change for every mitigation.
Prerequisites
- Maintain on-call ownership, escalation contacts, status-page access, a sandbox health probe, circuit-breaker/fallback controls, and a tested rollback path.
- Keep environment-specific keys in a secret manager with least privilege and documented revocation authority. Do not place credentials in incident chat or tickets.
- Configure redacted telemetry for status class, request ID, model class, latency, rate-limit headers, aggregate impact, and change history; exclude prompts, completions, PII, tool arguments, and key material.
Instructions
- Declare severity from observed scope, record a correlation ID, and verify the issue with a synthetic sandbox probe before changing production traffic.
- Check provider status, request IDs, rate-limit metadata, application error/latency aggregates, and recent deploys. Distinguish provider failure from key, permission, network, or request-shape failure.
- Contain with the narrowest reversible control: reduce traffic, open the circuit, queue noncritical work, or use an already approved fallback. Preserve authorization and retention rules during degradation.
- For a suspected key compromise, revoke through the secret manager/provider console, rotate, deploy to one canary, verify, and then revoke the old credential. Avoid exposing the key while testing.
- Confirm recovery with synthetic probes and aggregate production metrics, then roll back emergency configuration if it caused scope, quality, cost, or data-handling regressions. Capture a redacted postmortem and clean temporary artifacts.
Output
Produce an incident receipt with severity, start/end times, affected scope, status/error classes, aggregate request impact, mitigation and owner, provider/request IDs, canary and recovery evidence, rollback/revocation reference, follow-up actions, and retention status. Never include raw content or credentials.
Examples
For a synthetic 529 spike, record severity=P1; probe=529; circuit=open; noncritical_queued=true; fallback=approved-static; side_effects=0, then perform one bounded half-open probe after the configured interval. If it passes, canary recovery and record rollback=ready; cleanup=verified; otherwise keep the circuit open and escalate.
Resources
Next Steps
For data compliance, see anth-data-handling.
1---2name: anth-incident-runbook3description: Execute incident response procedures for Claude API outages and degradation. Use when Claude API is returning errors, experiencing high latency, or showing degraded performance in production. Trigger with phrases like "anthropic incident", "claude api down", "anthropic outage", "claude degraded", "anthropic runbook".4license: MIT5---6# Anthropic Incident Runbook
7
8## Severity Classification
9
10| Severity | Condition | Response Time |
11|----------|-----------|---------------|
12| P1 | API returning 500/529 for all requests | Immediate |
13| P2 | Rate limiting (429) or high latency (>10s p99) | 15 minutes |
14| P3 | Intermittent errors (<5% error rate) | 1 hour |
15| P4 | Degraded quality (not errors) | Next business day |
16
17## Immediate Triage (First 5 Minutes)
18
19```bash
20# 1. Check Anthropic status page
21curl -s https://status.anthropic.com/api/v2/status.json | python3 -c \
22 "import sys,json; d=json.load(sys.stdin); print(d['status']['indicator'], '-', d['status']['description'])"
23
24# 2. Test API connectivity
25curl -s -w "\nHTTP %{http_code} | Time: %{time_total}s\n" \
26 https://api.anthropic.com/v1/messages \
27 -H "x-api-key: $ANTHROPIC_API_KEY" \
28 -H "anthropic-version: 2023-06-01" \
29 -H "content-type: application/json" \
30 -d '{"model":"claude-haiku-4-20250514","max_tokens":8,"messages":[{"role":"user","content":"1"}]}'
31
32# 3. Check rate limit headers
33curl -s -D - https://api.anthropic.com/v1/messages \
34 -H "x-api-key: $ANTHROPIC_API_KEY" \
35 -H "anthropic-version: 2023-06-01" \
36 -H "content-type: application/json" \
37 -d '{"model":"claude-haiku-4-20250514","max_tokens":8,"messages":[{"role":"user","content":"1"}]}' \
38 2>/dev/null | grep -i "ratelimit\|retry-after\|request-id"
39```
40
41## Decision Tree
42
43```
44API returning errors?
45├── 401/403 → Key issue → Check ANTHROPIC_API_KEY is set and valid
46├── 429 → Rate limited → Check headers, reduce traffic, wait for retry-after
47├── 500 → Server error → Check status.anthropic.com, retry with backoff
48├── 529 → Overloaded → Temporary, retry after 30-60s
49└── Timeouts → Network or long generation → Increase timeout, check max_tokens
50```
51
52## Mitigation Actions
53
54### Rate Limiting (429)
55
56```python
57# Immediate: reduce traffic
58# 1. Enable circuit breaker
59# 2. Queue non-critical requests
60# 3. Switch to Message Batches for bulk work
61# 4. Reduce max_tokens to shorten generation time
62```
63
64### API Outage (500/529)
65
66```python
67# Graceful degradation
68def get_response_with_fallback(prompt: str) -> str:
69 try:
70 msg = client.messages.create(
71 model="claude-sonnet-4-20250514",
72 max_tokens=1024,
73 messages=[{"role": "user", "content": prompt}]
74 )
75 return msg.content[0].text
76 except (anthropic.InternalServerError, anthropic.APIStatusError):
77 return "Our AI assistant is temporarily unavailable. Please try again shortly."
78```
79
80### Key Compromise
81
82```bash
83# 1. Immediately revoke key at console.anthropic.com
84# 2. Generate new key
85# 3. Deploy new key to all environments
86# 4. Audit recent usage for unauthorized calls
87# 5. File incident report
88```
89
90## Postmortem Template
91
92```markdown
93## Incident: [Title]
94- **Duration:** [start] to [end]
95- **Severity:** P[1-4]
96- **Impact:** [what users experienced]
97- **Root Cause:** [what went wrong]
98- **Detection:** [how we found out]
99- **Mitigation:** [what we did to fix it]
100- **Request IDs:** [from debug logs]
101- **Action Items:**
102 - [ ] [preventive measure 1]
103 - [ ] [preventive measure 2]
104```
105
106## Error Handling
107
108| Symptom | Likely Cause | Quick Fix |
109|---------|-------------|-----------|
110| All requests fail 401 | Key rotated/expired | Check Console for active keys |
111| Sudden 429 spike | Traffic burst or tier change | Check rate limit headers |
112| Slow responses (>10s) | Large max_tokens or complex prompt | Reduce max_tokens, use Haiku |
113| Intermittent 500s | Upstream API issue | Check status.anthropic.com |
114
115## Overview
116
117This runbook provides a bounded, evidence-driven response to Claude API outages, throttling, latency, key compromise, and degraded behavior. It separates provider diagnosis from application containment and requires a reversible change for every mitigation.
118
119## Prerequisites
120
121- Maintain on-call ownership, escalation contacts, status-page access, a sandbox health probe, circuit-breaker/fallback controls, and a tested rollback path.
122- Keep environment-specific keys in a secret manager with least privilege and documented revocation authority. Do not place credentials in incident chat or tickets.
123- Configure redacted telemetry for status class, request ID, model class, latency, rate-limit headers, aggregate impact, and change history; exclude prompts, completions, PII, tool arguments, and key material.
124
125## Instructions
126
1271. Declare severity from observed scope, record a correlation ID, and verify the issue with a synthetic sandbox probe before changing production traffic.
1282. Check provider status, request IDs, rate-limit metadata, application error/latency aggregates, and recent deploys. Distinguish provider failure from key, permission, network, or request-shape failure.
1293. Contain with the narrowest reversible control: reduce traffic, open the circuit, queue noncritical work, or use an already approved fallback. Preserve authorization and retention rules during degradation.
1304. For a suspected key compromise, revoke through the secret manager/provider console, rotate, deploy to one canary, verify, and then revoke the old credential. Avoid exposing the key while testing.
1315. Confirm recovery with synthetic probes and aggregate production metrics, then roll back emergency configuration if it caused scope, quality, cost, or data-handling regressions. Capture a redacted postmortem and clean temporary artifacts.
132
133## Output
134
135Produce an incident receipt with severity, start/end times, affected scope, status/error classes, aggregate request impact, mitigation and owner, provider/request IDs, canary and recovery evidence, rollback/revocation reference, follow-up actions, and retention status. Never include raw content or credentials.
136
137## Examples
138
139For a synthetic 529 spike, record `severity=P1; probe=529; circuit=open; noncritical_queued=true; fallback=approved-static; side_effects=0`, then perform one bounded half-open probe after the configured interval. If it passes, canary recovery and record `rollback=ready; cleanup=verified`; otherwise keep the circuit open and escalate.
140
141## Resources
142
143- [API Status](https://status.anthropic.com)
144- [Error Reference](https://docs.anthropic.com/en/api/errors)
145- [Rate Limits](https://docs.anthropic.com/en/api/rate-limits)
146
147## Next Steps
148
149For data compliance, see `anth-data-handling`.