CCDV-P Study Guide

4. Domain 4: Advanced Debugging and Incident Response

4.2. 4.2 Incident response and learning loops: triage, mitigate, communicate, learn

CCDV-P · Domain 4 · Lesson 4.2 · 19 min read

Running an LLM incident when the system is up but wrong: triage, mitigation, rollback, communication, and the regression eval, monitor and runbook it leaves.

When the assistant is up and still wrong

Orvale City Services runs Ask Orvale, the resident-services assistant on the city's website. It handles about 12,000 conversations a day: bin collection, parking permits, building permits and property tax. It answers from the city's published pages, which a retrieval step finds, and it can call two tools, get_property_record and create_service_request. The model id is pinned in configuration, and so is the active prompt version.

On Friday at 16:30 the team released prompt resident-v42, a change meant to make answers shorter. On Monday at 08:50 a clerk at the Assessor's Office called Ask Orvale's engineering team. Two residents had phoned to ask which property-tax appeal deadline was right: their assessment letter said 30 April, but the city's own assistant had told them 15 May. The letter is right; this year the deadline moved two weeks earlier.

Every dashboard was green all weekend: errors at 0.3%, p95 latency (the time within which 95% of requests finish) at 4.1 seconds, refusals flat. Nothing crashed, so nothing paged. Meanwhile more than 20 residents an hour were asking about appeals. A web service outage announces itself; an LLM quality regression arrives as HTTP 200 and is reported, days late, by the people it harmed.

What the team needs is incident response adapted to LLM systems: triage the problem, stop the harm, tell the people affected, and fix the cause. Then comes the part most teams skip, the learning loop: turning the incident into a regression eval, a monitor and a runbook entry, so the same failure cannot ship or hide again.

Triage: how bad, how wide, and whose change

It is 08:55, and Odile, the engineer on call, has a choice to make before she has an explanation. Triage is the first fifteen minutes: three questions answered from evidence, in order, so that the team picks the right mitigation instead of the first one that comes to mind.

The incident lifecycle at Orvale

DETECTclerk's call, Monday 08:50
TRIAGEseverity, blast radius, origin
MITIGATEroll back to resident-v41, 09:20
COMMUNICATEresidents and city owners
LEARNeval case, monitor, runbook
LEARN → DETECT · every incident hardens the next release
Mitigation comes before diagnosis, and the last step feeds the next release.

SEVERITY is set by harm to users, not by error count. A wrong statutory deadline can cost a resident an appeal, so it is top severity at a 0.3% error rate. A clumsy answer about parking zones would be low severity at any volume. BLAST RADIUS is who and how many, measured from traces rather than guessed. Odile filters stored conversations to the property-tax intent since Friday 16:30 and finds 1,480 of them. A quick script that pulls dates out of the answers shows that 1,130 stated 15 May. She keeps the conversation ids, because the communication step will need them.

ORIGIN has three suspects: the provider, your own change, or your data. Each leaves different evidence.

Question Evidence that answers it Orvale's finding
Is it the provider? The status page, your own mix of 500 api_error and 529 overloaded_error responses, and whether every path degrades at once Status page green, 5xx flat, only appeal answers wrong
Is it our change? Onset lined up against your change log: prompt, model id, tools, retrieval settings, code Onset at 16:30 Friday to the hour; every bad trace carries resident-v42
Is it our data? Updates to the knowledge base or index, and what the failing traces actually retrieved Appeals page unchanged since January; the correct 30 April text was retrieved in the failing traces

Check the provider honestly rather than hopefully. Anthropic publishes a status page at status.claude.com, with separate components such as the Claude API, claude.ai and Claude Code. Subscribe to it by email, Slack, Microsoft Teams, webhook or RSS, so a provider incident reaches your incident channel without anyone thinking to check. A pinned model id rules out a silent model swap, because every Claude model id is a pinned snapshot. It does not rule out every provider-side cause. Anthropic's own 2025 postmortem described infrastructure bugs that degraded response quality for weeks without any model change. So a green status page is evidence, not proof; the decisive evidence here is the onset matching Orvale's own release to the hour.

Mitigation: stop the harm before you explain it

The tempting move is to open the prompt diff and start debugging. Resist it. Every hour spent explaining means more residents told the wrong date. Mitigation stops the harm now; the fix removes the cause later, and the two are separate jobs with separate deadlines.

Think of a burst pipe in an office building. You close the valve on that pipe first, and find out why it burst after the water stops. You cut the water to the whole building only if you cannot find the valve. LLM mitigations work the same way: five valves of different sizes.

Option When it wins What it costs
Roll back the prompt or model version Onset matches your release, and the previous version was good Loses whatever the release improved; needs versions held as configuration
Disable a tool One tool is the origin, or its actions cause the harm The tasks that need the tool fail or go to a person
Switch to a fallback (another model, region or platform) The provider is the origin: 529s, 500s, a status-page incident Quality and feature differences on the fallback path
Degrade gracefully One intent is harmed and the cause is unclear That intent gets a fixed, verified answer or a link instead of a generated one
Pause the feature Severe harm that cannot be scoped any narrower Every user loses the service, including the unaffected ones

Choose by three properties: the option must stop the harm the triage found, its scope should match the blast radius, and it should be the most reversible one that does both. When your own change correlates with the onset, rolling back to the last known-good version usually wins all three. The opposite instinct, a quick hotfix forward ("add a line saying the deadline is 30 April"), ships a new, untested change under pressure. It also hardcodes a fact that will be wrong next year.

At 09:20 Odile points the active-prompt setting back to resident-v41. Because prompt versions live in configuration, that is a one-line change with no deploy. By 09:35 she has replayed the twelve appeal questions from the bad traces and read the first fifty live appeal answers: every one states 30 April. Rolling back a model works the same way, by setting the previous pinned id, but only while that model is still available. Requests to a retired model fail with a 404 not_found_error, so a model rollback path lasts only until its retirement date on the deprecations page. Had the origin been unclear, her next valve was graceful degradation: answering appeal questions with the Assessor's Office text and a link while everything else ran normally. Pausing Ask Orvale entirely was considered and rejected, because about 95% of conversations were unaffected.

Communication: tell people what to do, not what you guess

A rolled-back prompt does not help the 1,130 residents who already have the wrong date in their heads. Here is the failure that makes communication part of incident response rather than an afterthought: the system is fixed, and the harm keeps happening offline.

There are two audiences. Affected users need the correct fact and what to do now. Orvale puts a banner on the appeals page and emails the 640 signed-in residents among the affected conversations, using the ids from triage. Stakeholders are the owners who must act or answer for the service: the Assessor's Office, the communications team, the service owner and city leadership. They need impact, status, decisions required and the time of the next update.

Odile's second stakeholder update shows the shape. Look at the decision line: whether late appeals are accepted is the Assessor's Office's call, not engineering's.

Ask Orvale incident, update 2, Monday 10:15. Status: mitigated, monitoring.
Impact: From Friday 16:30 to Monday 09:20 the assistant told residents the property-tax appeal deadline is 15 May. The correct deadline is 30 April. About 1,130 conversations are affected. No other topic is affected.
Mitigation: The prompt released on Friday was rolled back at 09:20. Every appeal answer checked since 09:35 states 30 April.
Residents: Banner on the appeals page since 10:00. Email to the 640 affected signed-in residents by 14:00, wording approved by the Assessor's Office.
Decision needed: Assessor's Office, whether appeals from affected residents filed after 30 April will be accepted.
Next update: 13:00, or sooner if anything changes.

Notice what the update leaves out: any guess about the cause. Early in an incident a stated cause is usually a hypothesis, and a retraction costs more trust than "under investigation". It also does not blame "the AI" or the vendor. Orvale shipped the release, so Orvale owns the error. Keep the cadence promised, even when the update is "no change".

The blameless postmortem

The prompt diff, read on Tuesday, explains the mechanism. To shorten answers, the author of resident-v42 added worked examples, and one was copied from last year's FAQ: an appeal answer stating 15 May. The model followed the example over the retrieved page. It would be easy to write "engineer pasted an outdated example" and stop there.

A blameless postmortem refuses that ending. It assumes people acted reasonably on what they knew, and asks what in the system let the error ship and stay hidden. That is not kindness for its own sake. Blame teaches people to hide their mistakes, and "be more careful" is not an action anyone can verify.

The same incident, two postmortems

Blame finding

An engineer pasted an outdated example
Action: be more careful
Next time: same gap, a different person

Systems findings

Prompt examples are never checked against authoritative facts
No regression case asks for a date
Full rollout on a Friday afternoon, no canary
No live check on factual answers; detected after 64 hours
A blame finding produces no change anyone can test; a systems finding produces action items with owners.

Orvale's postmortem, held on Thursday, has the usual sections: summary, impact, timeline, detection, response, contributing factors, what went well and action items. Every action item has an owner and a due date. What went well matters too: the rollback took one line because prompt versions were configuration, and that practice deserves protecting.

Detection gets its own section because the clerk's phone call was the only alarm. Anthropic's 2025 postmortem made the same point about its own systems. Its validation relied on benchmarks, safety evaluations, spot checks and canary deployments, and none of them caught the degradation users were reporting; the changes it announced included more sensitive evaluations and quality evaluations run continuously on production systems. Time to detect is a design property, not luck.

Closing the loop: eval case, monitor, runbook entry

Here is the question that separates a closed ticket from a closed incident: what stops this exact failure next time? Three artefacts answer three different parts of it, and each one covers a gap the others leave.

What one incident leaves behind

Wrong appeal deadlineresident-v42, 1,130 residents
Regression eval casecould it ship again? The release gate says no
Monitorwould we see it within minutes on live traffic?
Runbook entrycould the next on-call fix it without us?
Each artefact answers a different question, so an incident needs all three.

The regression eval case comes first. The twelve real questions from the bad traces, with personal details removed, go into the release suite, with paraphrases and the same question about other deadlines. A regression suite should pass at close to 100%, so a single wrong date blocks the release. The check below grades the answers in code, because a date is a fact you can test exactly. Look at the first comment and the docstring: the expected date comes from the city's calendar, never from a prompt, and the same function serves the gate and the monitor.

import re

# Expected dates come from the city's calendar service, never from a prompt
DEADLINES = {"property_tax_appeal": "30 April", "permit_renewal": "31 March"}
DATE = re.compile(r"\b\d{1,2} (?:January|February|March|April|May|June|July|"
                  r"August|September|October|November|December)\b")

def deadline_check(intent: str, answer: str) -> str:
    """One check, two uses: the release gate (offline) and live answers (monitor)."""
    expected = DEADLINES.get(intent)
    if expected is None:
        return "not_applicable"
    stated = set(DATE.findall(answer))
    if not stated:
        return "no_date"        # acceptable: the answer may link to the page instead
    return "pass" if stated == {expected} else "wrong_date"

The monitor runs the same check on a sample of live answers in every deadline intent, and pages when wrong_date appears. Evals catch what you anticipated before release; monitoring catches what reaches users anyway, from any cause, including a page edit or a provider issue. The runbook entry, "Wrong fact after a prompt release", writes down what Odile worked out under pressure.

  1. CHECK the status page and the 5xx mix; compare onset with the change log.
  2. ROLL BACK by setting the active prompt to the last known-good version.
  3. VERIFY with the regression cases and a sample of live answers.
  4. NOTIFY the owning department and pull affected conversation ids from traces.

A week later, shorter answers shipped again as resident-v43, through a gate that now contained the appeal cases.

The exam traps

Each trap here either acts on the wrong thing first or stops too early.

  • ✗ Diagnosing the root cause while the harm continues. ✓ Mitigate first with the most reversible step the evidence supports, then diagnose. At Orvale, every hour of debugging meant nearly twenty more residents told the wrong date.
  • ✗ Hotfixing forward with a new prompt line under pressure. ✓ Roll back to the last known-good version, and send the real fix through the normal release gate. A hotfix is an untested change shipped in the worst conditions.
  • ✗ Blaming the model or the provider and switching models. ✓ Check the status page and the 5xx mix, then line up onset with your own change log. A regression that starts with your release, on one path, is your change.
  • ✗ Pausing the whole assistant for a problem in one intent. ✓ Match the mitigation's scope to the blast radius: roll back, or degrade that one intent. Pause only when nothing narrower stops the harm.
  • ✗ Closing the incident when the dashboards turn green. ✓ Close it when affected users are told, and the regression eval, monitor and runbook entry exist. The dashboards were green during the incident too.
  • ✗ A postmortem that names "human error" as the root cause. ✓ A blameless postmortem names the system conditions that let the error ship and stay hidden, with owned action items.

Put it together: run a mini-incident end to end

You now have every piece: triage, a mitigation chosen for scope and reversibility, communication to users and owners, a blameless postmortem and the three artefacts that close the loop. The fastest way to own them is to cause a small incident on purpose and run it.

Two neighbouring skills build on this one. Complex failure diagnosis (4.1) is the deeper work of finding where a failure starts once the harm has stopped. Evaluation system design (5.1) turns cases like these into a suite that stays valid over time, and production monitoring (3.2) turns the live check into alerts that page without crying wolf.

Key takeaways

  • ✓ An LLM quality regression returns HTTP 200, so severity comes from harm to users, not from error rates or latency.
  • ✓ Triage measures the blast radius from traces and decides whether the origin is the provider, your change or your data, using the status page, the 5xx mix and onset against the change log.
  • ✓ Mitigate before you diagnose: choose the option that stops the harm, matches the blast radius and is easiest to reverse, usually a rollback when your release correlates.
  • ✓ Tell affected users the correct fact and what to do, and give stakeholders impact, status, decisions needed and the next update time, without guessing at the cause.
  • ✓ A blameless postmortem names the system conditions that let the failure ship and stay hidden, with action items that have owners and dates.
  • ✓ Every incident leaves a regression eval case, a production monitor and a runbook entry; only then is it closed.

Practise this

Practice questions for CCDV-P are being written and are not in this course yet. Read this lesson on the web to answer its check questions, with every option explained: https://claude.termidy.com/learn/ccdv-p/debugging-incident-response/incident-response-learning-loops/.

Sources