An Ops Runbook for Claude Failures: Case Cards, Request IDs, Owners and a Read-Only Investigation
Three symptoms land in the queue: a 429 with no retry-after, a 500 and a 200 with a wrong answer. Each belongs to a different owner. A case card, a request ID on every call, a five-kind triage and a read-only gate decide who acts first.
What you will learn
- Turn a failed Claude call into a case card with status, error type, request ID and a kind
- Triage five kinds (retry, capped, access, request, quality) and give each its owner and first move
- Explain why a 429 without retry-after must not be retried
- Keep Claude's part of an incident read-only and let the owner approve every change
Before you start
- Claude API error types
- Retries and backoff basics
Picture a support team, and the pager goes off. Something is failing, and everyone has an opinion. Before anyone fixes anything, there is one question: who acts first?
A good architect answers it before the incident, with evidence, an owner and a read-only first step. That is also where Claude fits in.
Three symptoms, three owners
Three symptoms land in the queue: a 429 with no retry-after, a 500 API error, and a 200 with a wrong answer. Each one belongs to a different owner. The spend cap goes to the billing owner. The 500 goes to platform on-call. The wrong answer goes to the service team. The first job is to decide whose problem it is.
Think of a hospital. At the front desk, someone names how urgent it is and what kind of case it is: that is the case card. The patient chart travels with the patient: for us, that is the request ID, carried by every call. And there is the doctor's order: nurses observe and the doctor prescribes, so responders read first, and a change needs the owner.
Capture the evidence before the page goes off
A case card keeps four things: the status, the error type, the request ID, and the kind, which you decide. The request ID comes from three places:
- Every response has a
request-idheader. - An error body has a
request_idfield. - The Python SDK exposes it on the response as
_request_id.
Log it on every call, so support can find the call. On Claude Platform on AWS there are two IDs: the AWS one is for CloudTrail, the Anthropic one is for support. A failure with no request ID in the log is the kind of gap covered in the instrumentation gap.
Five kinds, one first move each
The capped kind is the one people get wrong. A 429 without retry-after, or a 402 billing error, means the spend cap or a payment problem, and it keeps failing. Don't retry; check the payment details. The retry side, with backoff and breakers, is covered in reliability controls.
The triage as a small function
This project makes no model call. The six cases are recorded sample data, and the status codes, error types and request ID follow the Claude API errors docs. The kinds, owners and gate are the project's own pattern, not an Anthropic standard. From triage_log.py:
RETRYABLE = (500, 504, 529)
def case_card(call):
status = call["status"]
if status == 200:
kind = "quality"
elif status == 429 and call.get("retry_after"):
kind = "retry"
elif status in (402, 429):
kind = "capped"
elif status in RETRYABLE:
kind = "retry"
elif status in (401, 403):
kind = "access"
else:
kind = "request"
return {"id": call["id"], "kind": kind, "status": status,
"error_type": call["error_type"],
"request_id": call["request_id"]}
Order matters: a 429 with retry-after is caught before the capped branch. And the request ID rides on the card, whatever the kind.
The runbook and the gate
From runbook.py:
RUNBOOK = {
"retry": ("platform on-call",
"retry with backoff, then send the request ID to support"),
"capped": ("billing owner",
"do not retry, check payment details or wait for the cap"),
"access": ("access owner",
"check the key and its permissions"),
"request": ("integration team",
"fix the request, a retry cannot help"),
"quality": ("service team",
"open the trace, check harness, tools, data, then model"),
}
READ_ONLY = ("Read", "Grep", "Glob")
def route(card):
return RUNBOOK[card["kind"]]
def gate(tool):
ok = tool in READ_ONLY
return "allowed" if ok else "owner approves first"
def handoff(card):
owner, _first = route(card)
who = f"{card['id']} -> {owner}"
return f"{who}, escalate with {card['request_id']}"
Each kind maps to an owner and a first move. The gate allows Read, Grep and Glob; any other tool waits for the owner. And handoff gives the team one line with the owner and the request ID, so they can resolve the next incident without the architect.
Six cases, one gate
case cards
T-301 429 rate_limit_error req_demo01 -> retry
platform on-call: retry with backoff, then send the request ID to support
T-302 429 rate_limit_error req_demo02 -> capped
billing owner: do not retry, check payment details or wait for the cap
T-303 400 invalid_request_error req_demo03 -> request
integration team: fix the request, a retry cannot help
T-304 401 authentication_error req_demo04 -> access
access owner: check the key and its permissions
T-305 500 api_error req_demo05 -> retry
platform on-call: retry with backoff, then send the request ID to support
T-306 200 none req_demo06 -> quality
service team: open the trace, check harness, tools, data, then model
self-serve handoff
T-305 -> platform on-call, escalate with req_demo05
investigation gate
Read allowed
Grep allowed
Edit owner approves first
Bash owner approves first
T-301 and T-302 are both 429 rate_limit_error, yet they land in different kinds: T-301 has a retry-after, so retry; T-302 has none, so it is capped and must not be retried. T-303 is a bad request and T-304 a key problem. T-305, a 500, is escalated with its request ID. T-306 returned 200 with a wrong answer, so the service team opens the trace. Reading that trace is covered in reading an agent trace and debugging a Claude app: error types and traces.
Claude reads, the owner changes
On the read side, Claude and the responder read the logs, the trace and the code, and write down what they found. Plan mode helps: Claude researches and proposes, and edits stay blocked until the owner approves the plan. On the change side, edits, shell commands and deploys belong to the owner. The --allowedTools flag approves what you list; it isn't a fence, so keep the gate in the runbook too.
The trap: the blind retry loop
A call fails with a 429 and no retry-after. The code retries, and the same error comes back, again and again. It keeps hitting a capped account, it buries the billing problem, and no owner ever sees the case. The fix is to classify first: a capped case stops and goes to the billing owner.
So when a batch job gets a 429 with no retry-after for an hour and every retry fails, the first move is to stop retrying and page the billing owner. A spend cap does not clear by waiting, so a longer backoff only repeats the failure. Shorter prompts fix a bad request, not a cap. And raising the spend limit is a change, so it belongs to the owner, not to on-call.
Recap
| Step | Rule | In this runbook |
|---|---|---|
| Evidence | A request ID on every call | On every case card |
| Classify | The kind decides owner and move | retry, capped, access, request, quality |
| Investigate | Read-only | Read, Grep, Glob allowed |
| Change | The owner approves | Edit, Bash: owner approves first |
| Handoff | The team acts without the architect | Owner plus request ID in one line |
Classify the case, keep the evidence, and change with the owner. The project files for this lesson are in the community, free to join.
StudyEasy AI Community
Learn AI engineering, share what you build, and connect with other learners.
Free resources: lesson files, notebooks and code
Ask questions and join engineering discussions
Meet real people learning and building with AI
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
Three needs in one repo: a test command, a rule that Claude must never read .env, and a shared deploy skill. See which file each belongs in, how the settings layers merge, and what a plugin manifest carries.
Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
Pack a support team's ticket-triage routine into one skill folder, then watch three requests load one, two or all three levels: the catalog, the SKILL.md body, and a script whose code never enters the context.
One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI
Change one line in a repo and ask where it lands. A small resolver for bookshop-bot shows that a new model id in settings.json reaches only CI, a prompt bump reaches dev and CI, and a prod block edit reaches only prod.
Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges
Follow one prompt edit from a branch to a merge: version prompts and the model pin like code, keep the API key in GitHub Secrets, gate changes by path, let Claude review the diff, and leave the merge to a person.
