Topic 2 of 5 · 4 min read
Containing an AI incident fast
Goal: Order the first containment steps for an agent incident and say which logs to keep.
Containment means stopping the harm from growing while keeping the evidence you need to understand it. Fixing the cause comes later. The first hour is about stopping, protecting and recording, in that order.
Check yourself · 1 of 3
An AI agent is sending wrong emails. What should you do first?
Why it matters
AI systems act fast and often act alone. An agent that is wrongly sending emails can send a hundred more before anyone finishes a meeting. At the same time, if someone restarts everything in a panic, the record of what the agent saw and did can disappear. You need to stop it without erasing the trail.
The first steps, in order
- Stop the action. Pause the agent, switch off the workflow or turn off the automation. Prefer a pause over a delete. A paused system can be examined. A deleted one cannot.
- Cut access. Revoke the keys, tokens and permissions the agent used. Do this even after pausing, because a paused agent can be restarted by mistake.
- Save the evidence. Before changing anything else, copy the prompts, the model's replies, the tool calls, the timestamps, the settings in force and the version of the tool. Store them somewhere the agent cannot write.
- Limit the spread. Recall or hold messages that have not been read, put a notice on the page or chat that gave the bad answer, and tell the people who might act on it.
- Name an incident lead. One person decides and keeps a time-stamped log of every action taken.
Which logs matter
Keep what lets a stranger replay the event: the instructions the agent was given, the data it could reach, each action it took with a time, who or what approved it, and what it said about its own work. Also note which model and which settings were used, since a quiet update can change behaviour.
Before and after
Before: "The agent is acting up, so we deleted the project and started again."
After: "We paused the agent at 14:05, revoked its mail token at 14:08, exported the full run log to the incident folder, and held 31 queued emails. Cause not yet known."
What goes wrong
- Deleting instead of pausing. The cause is gone with the evidence.
- Stopping only the agent. Its keys still work, and so does the next copy someone starts.
- Too many hands. Three people fix three things and nobody records what changed.
Examples
An email agent goes wrong
An agent that books meetings starts replying to old threads with wrong dates.
14:05 Pause the agent. 14:08 Revoke its mail access. 14:12 Export the run log and the agent's instructions. 14:20 Hold the 31 messages still queued. 14:30 Tell the people on the 12 threads that already got a reply.
The cause can wait until the harm has stopped.
A quiet model update
A summary tool starts leaving out refund limits. The logs show the vendor changed the default model last week. Because the team saved the model name and settings, the review can point to the real cause instead of blaming the operator.
Key points
- Containment stops the harm from growing while preserving the evidence.
- Pause rather than delete, then revoke the keys and permissions the agent used.
- Save prompts, model replies, tool calls, timestamps and settings before changing anything else.
- Hold or recall messages that have not been read, and warn people who may act on the bad output.
- One incident lead keeps a time-stamped log of every action.
Common mistakes
- Deleting the agent or project, which destroys the evidence.
- Pausing the agent but leaving its keys and permissions active.
- Changing settings before saving the logs and configuration.
- Letting several people act without one lead or a written timeline.
Check yourself · 2 of 3
Why save logs before changing any settings?
Check yourself · 3 of 3
An agent has been paused. Which step still needs to happen to stop further harm?
Practice items, not counted towards your mastery.
Start here
- AI Incident Database (opens in a new tab)ToolFree
Searchable reports of real AI harms and near misses to learn failure patterns from.
- OECD AI Incidents and Hazards Monitor (opens in a new tab)ToolFree
Filter reported incidents by industry and type of harm.
- Postmortem culture: learning from failure (Google SRE book) (opens in a new tab)BookFree
The classic case for blameless reviews, with a sample write-up.
More for this topic
- Computer security incident handling guide (NIST SP 800-61 Rev. 3) (opens in a new tab)StandardFree
The standard incident response cycle, including containment and evidence handling.