AI Incident Response
The playbook for when it goes wrong
When an AI system misbehaves — leaks data, takes an odd action, or gets jailbroken at scale — you need a runbook: detect via logs, contain by killing tools and traffic, triage the blast radius, and root-cause with model and trace data.
What you will learn
- Detect AI incidents from telemetry
- Contain via tool/traffic cutoffs
- Root-cause from traces and model data
What is this?
AI incident response is a runbook for model-system failures: detection (anomaly metrics, sentries, user reports), containment (kill write tools, freeze traffic, rotate keys), triage (blast radius — which tenants/data/tools touched), and root cause (traces, model versions, prompts). Rehearsed, not improvised.
Why do you need it?
- AI failures can cascade quietly through tool chains.
- Speed of containment decides damage (leaks, writes).
- Trace-rich systems make root cause actually possible.
- A rehearsed runbook beats heroics under stress.
Mental model
A code red at an aquarium
Incident response
When a tank leaks, you don't argue about the fish — you isolate the tank (containment), check which tanks share water (blast radius), then train the pump (root cause). Drills (rehearsals) make the whole building move together. Same for an agent that's done something unplanned.
How it works
- Detect: anomaly dashboards, sentry flags, abuse reports.
- Classify: is it data, action, or jailbreak class?
- Contain: disable write tools, cut egress, freeze the rare path.
- Triage: who/what was touched; preserve traces.
- Root-cause: replay traces; fix; add eval case; postmortem.
The runbook.
In production
- Runbooks with on-call rotation for AI systems.
- Kill-switch toggles for write tools in dashboards.
- Telemetry that captures full traces for every incident.
Best practices
- Kill switches: instantly disable write-heavy tools.
- Capture traces BEFORE fixing (evidence first).
- Postmortems add the failure as an eval/golden case.
- Practice with red-team drills.
Common mistakes
- No telemetry = guessing at blast radius.
- Fixing code before capturing traces (evidence lost).
- Containment rested on disabling a tool that was still warm in caches.
Common issues
Containment didn't stop writesCache/queue still executing deferred tools
Drain or purge queues; kill at the tool boundary too.
Can't reproducePrompts/models unpinned
Pin model+prompt versions in the trace.
Debugging tips
- Silent incidents → rely on sentries + sample audits; they find what alerts miss.
- Blast radius unknown → trace join across tenants and tools.
- Repeat incidents → root causes not converted to eval cases.
Interview checkpoint
Hands-on lab
- Detect an anomaly from a synthetic log
- Contain via a kill switch
- Preserve traces for root cause
Draft an Incident Runbook Prototype
35 min · advanced
Quick quiz
First priority during an AI incident:
Traces should be captured before fixes.