AI Incident Response
Iron Law: Stabilize before investigating. Pull the kill switch or roll back before debugging root cause. Curiosity about why it broke must never delay stopping the bleeding.
When AI production behavior degrades, follow the procedure from the AI Playbook (Layer 4 §4.3). The objective: stabilize first, investigate second, learn third.
Stage 1: Stabilize (first 15 minutes)
Do these in order. Do not investigate root cause yet — that comes after the bleeding stops.
Confirm scope. Ask the user:
- What feature is affected?
- What is the symptom? (Wrong outputs / latency spike / cost spike / refusals / safety violation / user reports)
- When did it start?
- Is it ongoing right now?
Decide on rollback or kill. Check the Decision Record for rollback triggers. If the symptom matches:
- Pull the kill switch if the feature is causing user-visible harm. Confirm in chat before pulling.
- Roll back to last known good version (prompt, model, retrieval index, threshold) if the kill switch is too aggressive.
- Reduce traffic (drop the percentage rollout step) if the impact is bounded but worsening.
Capture the crime scene before anything else changes:
- Model version
- Prompt version
- Retrieval index version (if RAG)
- Tool versions (if agent)
- A sample of bad outputs with their inputs (sanitized)
- The time window
- Affected users / tenants
Notify. The Decision Record names an on-call owner. Tell them. If the incident has user impact, the team's incident comms process owns it from here.
Stage 2: Triage (next 30–60 minutes)
Quarantine bad outputs. Decide per the feature's design (Layer 4 §4.3):
- Recall (remove the output from view)
- Retract (notify affected users)
- Mark-as-disputed (annotate in the system)
- Annotate downstream records (e.g., flag the CRM entries created)
Reverse downstream actions if possible.
- For Tier 3+ actions: identify what was committed, who must authorize reversal, and execute.
- For Tier 0–2 (read-only or post-hoc reversible): may not need active reversal, but log the impact.
Check leading indicators (Layer 4 §4.3) to detect related cascading issues:
- "I don't know" / refusal rate
- Average composite confidence
- Output-contract validation rejection rate
- Human override rate
- p99 latency
- Cost per task
- Tool-call failure patterns
- Retrieval recall@k regression
Stage 3: Investigate (after stabilization)
Identify root cause. Common categories:
- Model regression (vendor pushed an update; pinning may have failed)
- Prompt regression (recent prompt change shipped without canary)
- Retrieval regression (chunking strategy changed, embeddings stale, ACL break)
- Tool regression (downstream API changed behavior)
- Prompt injection (intentional or accidental)
- Data drift (input distribution changed)
- Threshold miscalibration (confidence weights no longer fit reality)
- Cost or rate limit overrun (no infrastructure failure, just bill shock)
Identify the eval gap. Every confirmed incident represents an example your eval set didn't catch. Capture:
- The input that triggered the failure
- The expected behavior
- The actual behavior
- Why the existing evals didn't catch it
Stage 4: Learn (within 5 business days)
- Write the post-mortem. Use this template:
# Post-Mortem: <Feature Name> — <Date>
## Summary
- What happened (one paragraph)
- Severity (S0 / S1 / S2 / S3)
- User impact
- Duration: <detection time> → <stabilization time> → <full recovery>
## Timeline
- <time>: <event>
- <time>: <event>
- ...
## Root cause
<the actual cause, not the symptom>
## Why our controls didn't catch this
- Output Contract: ...
- Evals: ...
- Adversarial tests: ...
- Leading indicators: ...
- Kill switch / rollback: ...
## Eval gap — new test cases to add
- <input> → <expected> (was: <actual>)
- ...
## Prevention
- Immediate (this week): ...
- Short-term (this month): ...
- Structural (this quarter): ...
## Owner
<Named human>
- Update artifacts.
- Add new eval cases to the golden dataset.
- Add new adversarial cases to the CI test catalog if applicable.
- Update the Decision Record if assumptions changed.
- Update kill-switch tests if a new failure mode is now reachable.
- Calibrate. If the incident reveals that composite-confidence weights or thresholds are wrong, schedule a recalibration. Don't change thresholds during the incident.
Default stance
- Stabilize before investigating. Do not let curiosity about root cause delay killing the bleeding.
- Trust the kill switch. If it exists and is tested, pulling it is rarely the wrong call. The alternative — letting the incident continue while you debug — almost always is.
- Capture before changing. Every change after the incident starts erases evidence. Snapshot versions, logs, and sample outputs first.
- Don't recalibrate thresholds mid-incident. Tempting, but you don't have the data yet. Schedule it post-mortem.
- Every failure is labeled data. The single most valuable artifact from an incident is the new eval case it generates.
What this skill does NOT do
- It does not page on-call. Use your incident comms process.
- It does not authorize destructive reversals (refunds, retractions). Those need human approval per the feature's risk tier.
- It does not replace the team's general incident management playbook — it complements it with AI-specific steps.
If this skill cannot proceed
Abort condition: no Decision Record exists for the feature
→ Cannot determine rollback triggers or named owner.
→ Output: "No Decision Record at docs/ai-decisions/<feature-slug>.md.
Proceed without it, but rollback decisions must be made manually.
After the incident, run /ai-audit to retroactively create one."
Abort condition: kill switch location unknown
→ Output: "Kill switch location not documented. Escalate to the engineering team
to locate the feature flag manually. Do not attempt ad-hoc mitigations."
Abort condition: user wants to recalibrate thresholds during Stage 2/3
→ Hard stop. Output: "Do not recalibrate thresholds mid-incident. You don't have
reliable data yet. Schedule recalibration in the Stage 4 post-mortem."
Verify (Stage 2 completion check)
After Stage 2, before moving to Stage 3:
✅ Feature flag toggled or version rolled back — confirmed in deployment logs
✅ Bad outputs quarantined or retracted — confirmed in system
✅ On-call owner notified — confirmed via comms channel
✅ Crime scene captured — versions, sample inputs/outputs, time window logged
✅ Leading indicators checked — no cascading issues spreading
References
- AI Playbook Layer 4 §4.3 Incident response:
.claude/skills/ai-playbook/playbook.md
- AI Playbook Layer 4 §4.4 Kill switch tests:
.claude/skills/ai-playbook/playbook.md
- Post-mortem template: embedded in Stage 4 of this skill
- New evals after incident: run
/ai-eval-designer with the incident case as input
1---2name: ai-incident-response3description: Run the AI incident response procedure when something is going wrong in production AI. Use when the user explicitly runs /ai-incident-response or says "AI incident", "model is broken", "production AI is failing", "we're seeing weird outputs in prod", "hallucination in production", or similar urgent phrasing.4---56# AI Incident Response78> **Iron Law:** Stabilize before investigating. Pull the kill switch or roll back before debugging root cause. Curiosity about why it broke must never delay stopping the bleeding.910When AI production behavior degrades, follow the procedure from the AI Playbook (Layer 4 §4.3). The objective: stabilize first, investigate second, learn third.1112## Stage 1: Stabilize (first 15 minutes)1314Do these in order. Do not investigate root cause yet — that comes after the bleeding stops.15161. **Confirm scope.** Ask the user:17 - What feature is affected?18 - What is the symptom? (Wrong outputs / latency spike / cost spike / refusals / safety violation / user reports)19 - When did it start?20 - Is it ongoing right now?21222. **Decide on rollback or kill.** Check the Decision Record for rollback triggers. If the symptom matches:23 - **Pull the kill switch** if the feature is causing user-visible harm. Confirm in chat before pulling.24 - **Roll back to last known good version** (prompt, model, retrieval index, threshold) if the kill switch is too aggressive.25 - **Reduce traffic** (drop the percentage rollout step) if the impact is bounded but worsening.26273. **Capture the crime scene** before anything else changes:28 - Model version29 - Prompt version30 - Retrieval index version (if RAG)31 - Tool versions (if agent)32 - A sample of bad outputs with their inputs (sanitized)33 - The time window34 - Affected users / tenants35364. **Notify.** The Decision Record names an on-call owner. Tell them. If the incident has user impact, the team's incident comms process owns it from here.3738## Stage 2: Triage (next 30–60 minutes)39405. **Quarantine bad outputs.** Decide per the feature's design (Layer 4 §4.3):41 - Recall (remove the output from view)42 - Retract (notify affected users)43 - Mark-as-disputed (annotate in the system)44 - Annotate downstream records (e.g., flag the CRM entries created)45466. **Reverse downstream actions if possible.**47 - For Tier 3+ actions: identify what was committed, who must authorize reversal, and execute.48 - For Tier 0–2 (read-only or post-hoc reversible): may not need active reversal, but log the impact.49507. **Check leading indicators** (Layer 4 §4.3) to detect related cascading issues:51 - "I don't know" / refusal rate52 - Average composite confidence53 - Output-contract validation rejection rate54 - Human override rate55 - p99 latency56 - Cost per task57 - Tool-call failure patterns58 - Retrieval recall@k regression5960## Stage 3: Investigate (after stabilization)61628. **Identify root cause.** Common categories:63 - Model regression (vendor pushed an update; pinning may have failed)64 - Prompt regression (recent prompt change shipped without canary)65 - Retrieval regression (chunking strategy changed, embeddings stale, ACL break)66 - Tool regression (downstream API changed behavior)67 - Prompt injection (intentional or accidental)68 - Data drift (input distribution changed)69 - Threshold miscalibration (confidence weights no longer fit reality)70 - Cost or rate limit overrun (no infrastructure failure, just bill shock)71729. **Identify the eval gap.** Every confirmed incident represents an example your eval set didn't catch. Capture:73 - The input that triggered the failure74 - The expected behavior75 - The actual behavior76 - Why the existing evals didn't catch it7778## Stage 4: Learn (within 5 business days)798010. **Write the post-mortem.** Use this template:8182```md83# Post-Mortem: <Feature Name> — <Date>8485## Summary86- What happened (one paragraph)87- Severity (S0 / S1 / S2 / S3)88- User impact89- Duration: <detection time> → <stabilization time> → <full recovery>9091## Timeline92- <time>: <event>93- <time>: <event>94- ...9596## Root cause97<the actual cause, not the symptom>9899## Why our controls didn't catch this100- Output Contract: ...101- Evals: ...102- Adversarial tests: ...103- Leading indicators: ...104- Kill switch / rollback: ...105106## Eval gap — new test cases to add107- <input> → <expected> (was: <actual>)108- ...109110## Prevention111- Immediate (this week): ...112- Short-term (this month): ...113- Structural (this quarter): ...114115## Owner116<Named human>117```11811911. **Update artifacts.**120 - Add new eval cases to the golden dataset.121 - Add new adversarial cases to the CI test catalog if applicable.122 - Update the Decision Record if assumptions changed.123 - Update kill-switch tests if a new failure mode is now reachable.12412512. **Calibrate.** If the incident reveals that composite-confidence weights or thresholds are wrong, schedule a recalibration. Don't change thresholds during the incident.126127## Default stance128129- **Stabilize before investigating.** Do not let curiosity about root cause delay killing the bleeding.130- **Trust the kill switch.** If it exists and is tested, pulling it is rarely the wrong call. The alternative — letting the incident continue while you debug — almost always is.131- **Capture before changing.** Every change after the incident starts erases evidence. Snapshot versions, logs, and sample outputs first.132- **Don't recalibrate thresholds mid-incident.** Tempting, but you don't have the data yet. Schedule it post-mortem.133- **Every failure is labeled data.** The single most valuable artifact from an incident is the new eval case it generates.134135## What this skill does NOT do136137- It does not page on-call. Use your incident comms process.138- It does not authorize destructive reversals (refunds, retractions). Those need human approval per the feature's risk tier.139- It does not replace the team's general incident management playbook — it complements it with AI-specific steps.140141## If this skill cannot proceed142143```144Abort condition: no Decision Record exists for the feature145→ Cannot determine rollback triggers or named owner.146→ Output: "No Decision Record at docs/ai-decisions/<feature-slug>.md.147 Proceed without it, but rollback decisions must be made manually.148 After the incident, run /ai-audit to retroactively create one."149150Abort condition: kill switch location unknown151→ Output: "Kill switch location not documented. Escalate to the engineering team152 to locate the feature flag manually. Do not attempt ad-hoc mitigations."153154Abort condition: user wants to recalibrate thresholds during Stage 2/3155→ Hard stop. Output: "Do not recalibrate thresholds mid-incident. You don't have156 reliable data yet. Schedule recalibration in the Stage 4 post-mortem."157```158159## Verify (Stage 2 completion check)160161After Stage 2, before moving to Stage 3:162163```164✅ Feature flag toggled or version rolled back — confirmed in deployment logs165✅ Bad outputs quarantined or retracted — confirmed in system166✅ On-call owner notified — confirmed via comms channel167✅ Crime scene captured — versions, sample inputs/outputs, time window logged168✅ Leading indicators checked — no cascading issues spreading169```170171## References172173- AI Playbook Layer 4 §4.3 Incident response: `.claude/skills/ai-playbook/playbook.md`174- AI Playbook Layer 4 §4.4 Kill switch tests: `.claude/skills/ai-playbook/playbook.md`175- Post-mortem template: embedded in Stage 4 of this skill176- New evals after incident: run `/ai-eval-designer` with the incident case as input