●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through
Make Claude Your Production Debugging Companion: A Practical Design for Log Triage, Hypothesis Generation, and Repro Scripts
A field-tested blueprint for solo developers who carry their own pager. We split production debugging into three jobs Claude can actually own — log summarization, hypothesis generation, and minimal repro — with full prompts, sanitization code, and traps that cost me real downtime.
Have you ever been jolted awake at 2 a.m. by a pager and stared at a log dashboard for an hour while half-asleep? I have. Many times. If you work at a company with on-call rotations, the pain is shared. If you run apps and small SaaS products solo, the only person who can wake up is you.
That reality is what pushed me to stop treating Claude as "a chat I paste logs into" and start designing it as an explicit debugging companion. Instead of throwing a wall of text and hoping for the best, I split the work into three concrete jobs — summarizing logs, generating hypotheses, and producing minimal repro scripts — with dedicated prompts and a small preprocessing pipeline. The first thirty minutes of an incident, which used to feel like wandering in fog, now finishes in three to ten minutes most nights.
What follows is the architecture as I actually run it, including copy-paste prompts, the sanitization code I run before any log ever leaves my infrastructure, and the patterns that bit me hard enough to write down.
Why "delegate debugging to Claude" is a leverage point for solo developers
For a long time I was just pasting logs into Claude and asking, "what do you think?" The replies were sometimes useful, but stack traces over a hundred lines made Claude skim, and I kept re-explaining "this is a Node.js app on Cloudflare Workers" every single time.
The shift happened when I broke debugging into smaller pieces. When the pager fires, the first thing humans actually do can be split into three phases.
The staring phase — sift through enormous logs, find what is relevant, and stitch it back into a timeline.
The hypothesis phase — propose two or three candidate causes and rank them.
The verification phase — write a tiny script that proves or disproves the leading hypothesis without touching production.
The staring phase is the most cognitively expensive, especially at 2 a.m. with eyes half open. Hypothesis and verification, on the other hand, are quick for anyone with experience — given clean inputs. So the highest-leverage move is to hand the staring phase to Claude and keep the judgment for yourself.
I find it helpful to think of Claude as a "junior on-call buddy." The final call is mine, but the tedious preprocessing and the first cut of hypotheses are theirs. That single mental shift turned 2 a.m. from "despair" into "conversation."
The three layers of context to hand Claude
The cheapest way to get more useful output is to upgrade the input. I think of it as a three-layer context.
App design context — frameworks, key library versions, and deployment targets. In my case that is Next.js, Cloudflare Workers, Stripe, and a small KV layer.
Recent change context — the last deployed PR's summary, the last 24 hours of releases, and the file paths that were touched recently.
Symptom context — the actual error logs, the stack traces, and a rough estimate of who is affected.
Layers one and two are basically static between incidents, so it is wasteful to retype them. I store them in a Claude Project's instructions and system prompts. Only the symptom layer changes per incident, which makes the cold start almost zero.
More context is not better — relevance is. For debugging in particular, dumping 200 lines of unrelated logs pulls Claude's attention to the wrong fire and degrades the entire output.
✦
Thank you for reading this far.
Continue Reading
What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.
WHAT YOU'LL LEARN
✦Solo developers who used to stare at log dashboards for hours can now get a structured first hypothesis from Claude in under ten minutes
✦You will learn how to bind scattered error logs, stack traces, and metrics into one coherent context that Claude can actually reason over in production
✦You will reclaim the first thirty minutes of an incident — the part where you panic — and turn them into a calm, almost conversational triage flow you can run at 2 a.m.
Secure payment via Stripe · Cancel anytime
✦
Unlock This Article
Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.
The first tool is a dedicated log summarizer. The goal is not "tell me what happened in plain English" but "transform raw logs into a machine-readable intermediate representation that the next prompt can consume."
What this code does — turn raw logs into a structured timeline summary that the hypothesis prompt can ingest directly.
# log_summarizer.pyimport anthropicimport jsonclient = anthropic.Anthropic()LOG_SUMMARY_SYSTEM = """You are a senior SRE on first-line incident response.Read the logs and return a structured summary as JSON.Output format (strict):{ "incident_window": "ISO8601 range of the affected time", "primary_error": "one-line description of the most frequent or earliest error", "error_chain": [{"timestamp": "...", "service": "...", "message": "..."}, ...], "affected_users": "estimated impact (use 'unknown' if unclear)", "deduped_count": {"error_signature": count}, "first_questions": ["up to three things a human should check next"]}Rules:- Truncate stack traces to the top three frames.- Replace any visible PII (emails, tokens, names) with [REDACTED].- Use 'unknown' for fields you are not confident about. Empty strings are forbidden."""def summarize_logs(raw_logs: str) -> dict: """Convert raw logs into a structured incident summary.""" try: msg = client.messages.create( model="claude-sonnet-4-6", max_tokens=2000, system=LOG_SUMMARY_SYSTEM, messages=[{"role": "user", "content": raw_logs}], ) text = msg.content[0].text.strip() # Claude sometimes wraps the JSON in code fences — strip them. if text.startswith("```"): text = text.split("```")[1] if text.startswith("json"): text = text[4:] return json.loads(text) except json.JSONDecodeError as e: return {"_raw": msg.content[0].text, "_parse_error": str(e)} except anthropic.APIError as e: return {"_api_error": str(e)}# Expected output# {# "incident_window": "2026-04-29T02:14:00Z/2026-04-29T02:18:00Z",# "primary_error": "Stripe webhook signature verification failed",# "error_chain": [...],# "affected_users": "estimated 12 paid users",# "deduped_count": {"InvalidSignature": 47, "TimeoutError": 3},# "first_questions": [# "Did STRIPE_WEBHOOK_SECRET change in the last deploy?",# "Is the request timestamp header drifting from server time?",# "Could the Cloudflare layer be mutating the request body?"# ]# }
Why JSON instead of prose? Because the next prompt needs to consume this output mechanically. If you accept free-form text, the format drifts every run and your automation breaks.
The first_questions array is capped at three on purpose. A human under stress can only juggle a handful of branches at once; ten suggestions would just get ignored from the fourth onward. Truncating stack traces to three frames is a similar guardrail — long stacks crowd out the rest of the context window. If the bottom of the stack actually matters, the verification phase pulls it in on demand.
Hypothesis-driven prompting
Once you have a clean summary, the next move is to generate hypotheses with a verification plan attached. A bare list of "things that might be wrong" is not enough; you want each hypothesis paired with a concrete way to confirm it.
What this code does — convert a structured summary into a prioritized list of hypotheses, each with an associated verification action.
# hypothesis_generator.pyimport anthropicimport jsonclient = anthropic.Anthropic()HYPOTHESIS_SYSTEM = """You are a senior engineer who runs first-line incident response.Given a structured incident summary, produce hypotheses for the root cause.Output format (JSON):{ "hypotheses": [ { "id": "h1", "summary": "one-line hypothesis", "likelihood": "high|medium|low", "evidence_in_logs": ["which parts of the summary support this"], "verification": { "type": "command|query|manual", "action": "the exact command or check to run", "expected_if_true": "what you would see if this hypothesis is correct" }, "rollback_safe": true } ], "recommended_first": "h1", "do_not_jump_to": "any taboo actions in this incident — DB writes, blind rollbacks, etc."}Rules:- At most four hypotheses.- Each hypothesis must be independently verifiable.- Verification commands must be read-only by default.- Set rollback_safe to false if the fix involves DB migrations or data deletion."""def generate_hypotheses(summary: dict, app_context: str) -> dict: user_msg = f"""# App context{app_context}# Incident summary{json.dumps(summary, ensure_ascii=False, indent=2)}Return hypotheses for first-line response in the JSON format above.""" msg = client.messages.create( model="claude-sonnet-4-6", max_tokens=2500, system=HYPOTHESIS_SYSTEM, messages=[{"role": "user", "content": user_msg}], ) text = msg.content[0].text.strip() if text.startswith("```"): text = text.split("```")[1] if text.startswith("json"): text = text[4:] return json.loads(text)
The hidden virtue of this prompt is the verification.type enum. If you let Claude write free-form verification steps, it will cheerfully suggest things like "just edit the production database to fix this row." Splitting verification into command | query | manual makes the danger level legible at a glance, and lets you wire automation safely (commands are auto-runnable, manual checks need a human).
The do_not_jump_to field exists for a specific reason: I once almost rolled back a deploy that contained a database migration, which would have left orphaned rows. Claude saved me by flagging "this commit includes a migration; rolling back will leave inconsistent state." It is worth the few extra tokens.
Generating minimal repro scripts
Once one hypothesis looks promising, you want to confirm it without touching production. Claude is excellent at generating minimal repro scripts when prompted carefully.
What this code does — take a single hypothesis as input and produce a self-contained, locally runnable script along with expected output.
# repro_generator.pyimport anthropicclient = anthropic.Anthropic()REPRO_SYSTEM = """You are an expert at writing minimal reproductions of production bugs.Given a hypothesis and the relevant tech stack, produce a script someone can run locally.Output format:1. ## Prerequisites environment variables and dependencies needed2. ## Repro script ```python (or shell) code fence with the actual script3. ## Expected output what the run should print if the hypothesis is correct, and what to expect otherwise4. ## Safety why this script will not affect production, or warnings if it mightRules:- Never write to the production database.- If the script calls external APIs, keep the call count to one to three.- If a mock server is needed, include the steps to start it."""def generate_repro(hypothesis: dict, tech_stack: str) -> str: user_msg = f"""# Tech stack{tech_stack}# Hypothesis to test{hypothesis}Write a minimal local reproduction.""" msg = client.messages.create( model="claude-sonnet-4-6", max_tokens=3000, system=REPRO_SYSTEM, messages=[{"role": "user", "content": user_msg}], ) return msg.content[0].text
For my own apps, I save these generated scripts into scripts/repro/ and check them into the repo. They double as regression test starting points and as institutional memory — when a similar incident happens months later, I can search by symptom and find the script that proved or refuted a similar hypothesis.
To raise the quality further, pin the tech stack into your Claude Project's knowledge so that you do not have to paste it on every invocation. This also makes the repro scripts feel idiomatic to your codebase rather than generic Python.
Sanitizing logs before they leave your infrastructure
Up to this point I have been waving "send logs to Claude" around casually, but production logs contain emails, tokens, and other PII you really should not be exporting to a third party. Treat sanitization as non-negotiable — both for legal reasons and because once a token leaks into someone else's training corpus, you cannot pull it back.
What this code does — a small, extensible sanitization pipeline that runs before any log is sent to the API.
# log_sanitizer.pyimport refrom typing import PatternSENSITIVE_PATTERNS: list[tuple[Pattern[str], str]] = [ # email addresses (re.compile(r"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}"), "[EMAIL]"), # JWT (three base64url segments) (re.compile(r"eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+"), "[JWT]"), # Stripe keys (re.compile(r"sk_(live|test)_[A-Za-z0-9]{16,}"), "[STRIPE_KEY]"), # GitHub PATs (re.compile(r"ghp_[A-Za-z0-9]{20,}"), "[GH_PAT]"), # Anthropic API keys (re.compile(r"sk-ant-[A-Za-z0-9_-]{20,}"), "[ANTHROPIC_KEY]"), # IPv4 (re.compile(r"\b(?:\d{1,3}\.){3}\d{1,3}\b"), "[IP]"),]CARD_CANDIDATE = re.compile(r"\b\d(?:[ -]?\d){12,18}\b")def _luhn_ok(digits: str) -> bool: """Luhn チェック: カード番号の検査桁と整合するか""" total, double = 0, False for ch in reversed(digits): d = int(ch) if double: d = d * 2 - 9 if d > 4 else d * 2 total += d double = not double return total % 10 == 0def _mask_cards(text: str) -> str: def repl(m: re.Match) -> str: digits = re.sub(r"[ -]", "", m.group()) if 13 <= len(digits) <= 19 and _luhn_ok(digits): return "[CC_NUMBER]" return m.group() # Luhn does not pass: keep it as a timestamp or ID return CARD_CANDIDATE.sub(repl, text)def sanitize_log(log: str, max_lines: int = 300) -> str: """Apply masking patterns and clip the log to a manageable size.""" redacted = log for pattern, replacement in SENSITIVE_PATTERNS: redacted = pattern.sub(replacement, redacted) redacted = _mask_cards(redacted) lines = redacted.splitlines() if len(lines) > max_lines: head = lines[: max_lines // 2] tail = lines[-max_lines // 2 :] skipped = len(lines) - len(head) - len(tail) return "\n".join(head + [f"... ({skipped} lines skipped) ..."] + tail) return redactedif __name__ == "__main__": sample = """[2026-04-29T02:14:00Z] ERROR user=alice@example.com token=eyJhbGciOiJIUzI1NiJ9.payload.sig[2026-04-29T02:14:01Z] Stripe key sk_live_AbCdEf1234567890abcdef leaked![2026-04-29T02:14:02Z] ts=1714356840123 order_id=2026042902140012346 client=203.0.113.7[2026-04-29T02:14:03Z] card 4242 4242 4242 4242 declined""".strip() print(sanitize_log(sample)) # Expected output: # [2026-04-29T02:14:00Z] ERROR user=[EMAIL] token=[JWT] # [2026-04-29T02:14:01Z] Stripe key [STRIPE_KEY] leaked! # [2026-04-29T02:14:02Z] ts=1714356840123 order_id=2026042902140012346 client=[IP] # [2026-04-29T02:14:03Z] card [CC_NUMBER] declined
One correction to my own first draft of this sanitizer: it originally flagged any run of 13–19 digits as a card number. When I ran it against realistic logs, millisecond timestamps like ts=1714356840123 and long order IDs all became [CC_NUMBER], and a log without timestamps cannot be laid out on a timeline.
The version above adds a Luhn checksum on top of the length check. The timestamp now survives, while 4242 4242 4242 4242 is still masked. It is not perfect — roughly one in ten random long digit strings passes Luhn by chance, and one of the two 19-digit IDs I tried (identical except for the last digit) was masked by mistake. I can live with that. Over-masking is cheaper than leaking. If a masked value turns out to matter, I whitelist that specific line rather than loosening the rule.
The sanitization pass should run twice in your pipeline: once when logs are written (so they are clean at rest), and again right before sending them to Claude (defense in depth). In practice the second pass catches things like Stripe webhook bodies, where a token can sneak in through fields you did not anticipate.
The 300-line cap is empirical. Beyond that, summarization quality drops because Claude starts skipping the tail. If a longer window is genuinely needed, run the summarizer first and feed the compacted output forward — that scales much better than throwing everything at one prompt.
Traps I keep seeing (and how to avoid them)
These are the patterns I have stepped in personally and now actively avoid.
1. Do not paste "all the logs."
I once dumped 100,000 lines of production logs and asked Claude to figure it out. The bill was painful and the answer was vague. Always run the summarization step first; raw logs are a supporting reference, not the main input.
2. Do not trust hypotheses without verification.
Treat each hypothesis like the first guess of a junior engineer who just walked into the war room. The reasoning is usually plausible, but the model has no idea about your code's quirks. Always run verification.action before acting on a hypothesis.
3. Do not let the agent commit fixes during the first thirty minutes.
Letting Claude Code commit on your behalf is great in normal development (I wrote about keeping a trail with hooks in debugging Claude Code hooks in production). During an active incident, it creates meta-incidents — "wait, did the bot just push something while I was investigating?" Keep diagnosis and remediation separate, and gate any agent-driven commit behind explicit human approval.
4. Do not let it casually recommend rollbacks.
The do_not_jump_to field exists because Claude, given "errors started after the latest deploy," loves to suggest rollbacks. But rollbacks across migrations are dangerous. Asking the prompt to evaluate rollback_safe explicitly cuts the impulse before it reaches a tired human.
5. Do not blur service boundaries.
When you concatenate logs from multiple services, mark the seams clearly:
Without these dividers, Claude has to guess which line belongs to which service and tends to invent causality across them. Explicit boundaries are the cheapest accuracy upgrade you will ever apply.
When the companion itself breaks: a triage table
A while after I had this running, a summary landed in Slack cut off mid-sentence. The first_questions array never closed. I told myself Claude was having an off night and resent the same request three times. It broke at the same spot all three times. The cause wasn't Claude at all — I had shrunk max_tokens at some point, and the logs had quietly grown past it.
The worst thing on an incident night is a diagnostic tool that fails without saying so. I triage the companion with the same table I use for production. Here is the one I keep open (error names and behavior checked against the official docs as of November 2026).
Symptom
Likely cause
How to confirm
Fix
The summary JSON stops halfway and fails to parse
Output hit max_tokens
stop_reason is "max_tokens"
Raise max_tokens, or trim the sanitized logs first
cache_read_input_tokens stays 0 on repeat calls
The cached block is under the model's minimum, or its prefix changes each call
Both cache_creation_input_tokens and cache_read_input_tokens are 0
Merge the static app context into the cached block; move variable parts after it
Every request suddenly returns 404 not_found_error
A hard-coded model ID has been retired
The ID appears as Retired on the model deprecations page
Switch to the listed replacement and keep the ID in a single config value
429 rate_limit_error keeps coming back no matter how long you wait
Not a rate limit — the usage tier's monthly spend cap
The response has no retry-after header (spend-cap 429s don't)
Check limits and billing in the Console; stop retrying and cap queue retries too
400 invalid_request_error right when you expected a limit error
A spend limit you set on the organization or workspace
The error message refers to the usage limit
Revisit the limit, or route incident traffic through a separate workspace
A few minutes of 529 overloaded_error late at night
Temporary overload on the API side
Other requests in the same window also return 529
Retry a few times with spacing; if it persists, send raw-log alerts without a summary
To make the same call at the code boundary, I wrap the summary request in a small function. Its job is simple: never forward a broken response to Slack, and say in one word what went wrong.
# guard.py — wrap the summary call so broken responses never reach the alert channelimport jsonimport anthropicdef safe_summary(client: anthropic.Anthropic, model: str, system: list, logs: str) -> dict: try: msg = client.messages.create( model=model, max_tokens=2000, system=system, messages=[{"role": "user", "content": logs}], ) except anthropic.NotFoundError: # Retired model IDs come back as 404 not_found_error return {"error": "model_not_found", "model": model} except anthropic.RateLimitError as e: # A 429 without retry-after may be the monthly spend cap; waiting won't fix it return {"error": "rate_limited", "retry_after": e.response.headers.get("retry-after")} if msg.stop_reason == "max_tokens": return {"error": "truncated", "hint": "raise max_tokens or trim the logs first"} text = "".join(b.text for b in msg.content if b.type == "text") try: return json.loads(text) except json.JSONDecodeError: return {"error": "invalid_json", "head": text[:200]}# What reaches Slack on failure:# {"error": "truncated", "hint": "raise max_tokens or trim the logs first"}
I return a dict instead of swallowing the exception so the queue handler can announce that the summary itself failed. When the companion goes quiet, I read the silence as "all clear" — which is exactly what those three resends were. One honest caveat: the 404 branch follows the documented behavior; I haven't actually hit a retired ID with it yet.
Wiring it into a real SaaS
To close the loop, here is roughly how I run this in a small SaaS I operate solo. Sentry and Cloudflare Logpush funnel notable errors into a Cloudflare Queue. A Worker pulls messages in batches, runs the pipeline, and posts the result to a dedicated Slack channel.
Two implementation notes worth taking. First, prompt caching can cut cost here, with a correction to what I first wrote. Only blocks marked with cache_control are cached, and there is a minimum cacheable length — 1,024 tokens for Sonnet 4.6 and 4,096 for Haiku 4.5, per the current docs. Each system prompt above is only a few hundred tokens (a rough estimate), so as written it would never be cached; the request simply runs uncached, with no error.
msg = client.messages.create( model="claude-sonnet-4-6", max_tokens=2000, system=[ { "type": "text", # summary prompt + static app context; keep the total above 1,024 tokens "text": LOG_SUMMARY_SYSTEM + "\n\n" + APP_CONTEXT, "cache_control": {"type": "ephemeral"}, } ], messages=[{"role": "user", "content": sanitized_logs}],)# If cache_read_input_tokens stays 0 on the second call, you are under the minimum or the prefix changes each timeprint(msg.usage.cache_creation_input_tokens, msg.usage.cache_read_input_tokens)
Fold the static app-context layer into the same system block so the total clears the threshold, then confirm on the second call that cache_read_input_tokens is non-zero.
Second, the isHigh gate exists because running hypothesis generation on every error is rarely worth it. Most batches just want a Slack-friendly summary; only a small fraction deserves the full hypothesis-and-verification treatment. Letting humans pull the trigger for deeper analysis keeps the system economically sane.
A real incident: the Stripe webhook timeout
Let me ground this with a story. A few months ago my SaaS started rejecting webhook deliveries from Stripe at about 4 a.m. Sunday. The pager fired, and Sentry showed roughly fifty InvalidSignature errors clustered in a four-minute window, with no other obvious activity around them.
Without the pipeline I would have spent twenty minutes squinting at logs trying to remember the exact verification flow. Instead, I dropped the raw log batch into the sanitizer, ran the summarizer, and got back a JSON object whose first_questions were:
"Did STRIPE_WEBHOOK_SECRET change in the last deploy?"
"Is the request timestamp drifting?"
"Is something between Stripe and the worker rewriting the body?"
Those three questions were exactly the right ones. The hypothesis generator then ranked "Cloudflare-side body transformation" as medium, because the summary mentioned a recent change to a custom worker route. I ran the verification command (a curl reproducing a known-good payload through the same route), got an unexpected JSON re-serialization, and shipped a minimal fix in about twelve minutes from pager to PR.
The point is not that Claude solved the bug — I solved it. But Claude compressed the staring phase from "twenty minutes of bleary scanning" to "ninety seconds of reading three crisp questions." That compression is the entire value proposition.
Choosing the right model and being honest about cost
It is tempting to default to the most powerful model for everything. In practice I run a tiered setup, because cost adds up quickly when a queue is firing.
Summarization — claude-sonnet-4-6 is the sweet spot. Haiku-class models are a reasonable candidate, but check on your own logs that no schema fields get dropped before switching (and note that Haiku 4.5's cache minimum is 4,096 tokens). Opus is overkill for what is essentially structured extraction. Once the cached block clears the minimum above, cache reads cost far less than uncached input.
Hypothesis generation — same model. The reasoning required is comparable to a thoughtful junior engineer, not a research-grade analyst.
Repro generation — Sonnet again. If you find Claude struggling with the most exotic parts of your stack, I would experiment with bigger context first (paste the relevant module verbatim) before reaching for a heavier model.
Confirmation and write-ups — sometimes I escalate to Opus when I want a richer postmortem narrative for the team channel. That happens after the incident is contained, not during.
A hard lesson I had to learn was to instrument the cost. Without an explicit dashboard, the API spend can balloon silently. I now log per-incident token usage to a tiny KV counter, with a daily cap that pages me if it is exceeded. Without a cap, a misconfigured queue that retries a message in a tight loop can run up the bill overnight; with one, the loop stops before the invoice does.
Where the models stand as of November 2026
The tiers above were built on Sonnet 4.6. When I revisited this piece (November 2026, checked against the official models overview and deprecations pages), the picture looked like this.
Model ID
Status
Cache minimum
Role in this setup
claude-sonnet-4-6
Active (retirement not sooner than February 17, 2027)
1,024 tokens
Keep a working pipeline as it is
claude-sonnet-5-5
Current Sonnet
512 tokens
First choice for anything new or migrated
claude-haiku-4-5-20251001
Active
4,096 tokens
High-volume, low-severity first-pass summaries, after checking for dropped fields
claude-sonnet-4-5-20250929
Retires November 30, 2026
—
Don't use; the replacement is claude-sonnet-5-5
claude-opus-4-5-20251101
Deprecated, retires January 22, 2027
—
If it writes your postmortems, move to claude-opus-5-5
The decision fits in one line. Leave the working summary pipeline on Sonnet 4.6, and move new pieces and anything on a deprecated ID to Sonnet 5.5 first. Swap everything at once and you can no longer tell whether the summaries changed because of the model or because of the logs.
Two misconceptions I held for longer than I'd like to admit:
"A dateless ID will roll forward to the newest model." It won't. The models overview states that every Claude model ID is a pinned snapshot, including the dateless IDs used from the 4.6 generation on. Code that says claude-sonnet-4-6 calls Sonnet 4.6 until it retires.
"If the cached block is too short, the API will tell me." It won't either. A request under the minimum is processed without caching and returns no error; the two usage fields are the only signal.
Boundary lines: what the agent should never own
Even after using this setup for many months, I am fairly conservative about what I let Claude do unsupervised. Here is the boundary I draw, written down so I do not erode it under pressure.
Reading and summarizing logs: yes, fully delegated.
Proposing hypotheses with verification: yes, fully delegated.
Running read-only verification commands automatically: only behind a command allowlist, and only inside an isolated sandbox.
Touching production state: never. Database writes, feature flag flips, and traffic shifts go through me, even at 3 a.m.
Posting to public status pages: never. Customer-facing communication is one of the few places I personally review every word, because tone matters and Claude's defaults can read as either too breezy or too alarming.
Closing or merging PRs: only after I have read the diff. I will let Claude open a PR with proposed changes, but the merge button stays human-controlled until further notice.
The drift to watch for is "feature creep at 2 a.m." After a successful triage, it is tempting to think, "great, next time I will let it just go ahead and apply the fix." Resist that urge until you have seen the system handle at least a dozen incidents reliably. The cost of one wrong autonomous action — a bad migration rollback, a flag flipped on a customer's behalf — is much higher than the value of saving a few minutes per incident.
Iterating on the prompts: how I keep them sharp
The prompts above are a snapshot of where I am right now. They were not perfect on day one. I keep them in a small repository with a changelog so that I can see the trajectory and roll back when an "improvement" turns out to be a regression.
A useful habit is the post-incident prompt review. After each non-trivial incident, I open the prompt files and ask: did the summarizer surface the right first_questions? Did the hypothesis generator over-rank a low-likelihood guess? Did the repro script touch anything it should not have? If the answer to any of these is "no," I write a tiny test case using the actual sanitized log from that incident and re-run the prompt against the candidate change. The test case lives in the repo as a regression fixture.
Another habit worth mentioning is templating the change history into the system prompts themselves. When the summarizer prompt rejects an output format that worked last week, I want to know why. Adding a one-line "version" field at the bottom of the system prompt — even just # v3, last edited 2026-04-20 — has saved me from chasing phantom regressions multiple times.
Finally, do not be afraid to write site-specific instructions. Generic best practices only go so far. The summarizer in my Stripe-heavy app explicitly says "treat 'InvalidSignature' as a top-priority error category, even if rare in volume," because that pattern matters more for revenue than the same number of generic 500s. Tailoring the prompt to your business will do more for accuracy than any model upgrade.
Sharing the load with future-you
One last reflection. The deepest reason I built this pipeline is not "Claude is fast" or even "tokens are cheap." It is that incident response, done alone, is a particular kind of lonely. You are tired, the customer is upset, and the only feedback loop you have is your own internal monologue.
A well-designed companion does not just save time — it externalizes the loop. When the summary comes back as a tidy JSON object, it acts as proof that someone (or something) else has at least looked at the problem with you. The hypothesis prompt is, in effect, a small ritual of "let us list out what could be wrong before we panic." The repro script is "let us reach for the keyboard with a plan, not a hunch."
If you carry the pager alone, this kind of structure is more important than any individual prompt. It is the scaffolding that lets you behave like a professional even when your sleep-deprived brain wants to thrash. Build it once, refine it over time, and it will outlast any specific outage. That, more than the raw productivity gains, is what I would want a fellow solo developer to take from this article.
The next wall: the API gets busiest on your worst night
Once the companion is live, the next thing you hit is an irony — requests pile up precisely when production is on fire. Fifty errors arrive together, queue retries overlap with summary calls, and now the companion is the one receiving 429s.
You do not need to build the whole pipeline at once. The single most useful step is to copy the sanitizer, run your usual logs through it, and look at how much PII falls out. That alone changes how you think about pasting production data into chats.
After that, wait until your next real incident and try the summarizer prompt instead of free-form chat. If you find yourself wishing for an immediate first cut of hypotheses, add the second prompt. Layer the rest as the pain demands. That order — pain-driven adoption — is how this stack stayed maintainable for me.
I still dislike pager nights. But having Claude in front of the dashboard with me makes the loneliness more manageable. If even one corner of this article saves you twenty minutes the next time your phone buzzes at 2 a.m., it has earned its keep.
If you want to deepen the underlying mental model, I recommend Practical Monitoring by Mike Julian (O'Reilly) (the Japanese edition is very good). Its layered framing of "symptom / cause / business impact" is exactly the lens I would use to refine the summarization prompt above.
Share
Thank You for Reading
Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.