By Oliver · AI Architect, BuildAClaw · Nov 7, 2026 · 10 min read
How to Write Your AI Worker's Incident Playbook: What to Do the Day a Model Misbehaves or Gets Breached
Your AI worker will have a bad day. The only open question is whether you spend that day following a one-page checklist or improvising while it keeps sending emails.
Here is the number that should bother you: when an AI agent goes wrong, the damage scales with minutes of delay, not severity of the bug. An agent that sends 40 wrong emails in the first 10 minutes and then gets stopped is a bad afternoon. An agent that keeps going for 6 hours because nobody knew where the off switch was is a customer-notification event.
Most small businesses I talk to have an employee handbook, a fire exit plan, and a password manager. Almost none have a written plan for the AI worker that now touches their inbox, calendar, CRM, and invoices. Security was one of the recurring themes in the 138 pain-point conversations we catalogued from Reddit (10 were explicitly about security, and many of the 88 setup posts were really about fear of what the agent could touch). One commenter put it bluntly about running agents without understanding the basics: "It is so dangerous and people just take it too easy." They are not wrong. This article gives you the playbook that turns that fear into a procedure.
The target numbers: pause the agent in under 60 seconds, revoke every credential it holds in under 15 minutes, and have a written root-cause summary within 72 hours. Everything in this playbook exists to hit those three numbers.
1. Define What "Incident" Means Before It Happens
The first mistake is treating every odd output as an emergency, or worse, treating none of them as one. Write down severity tiers in advance so nobody debates definitions at 2 a.m. I use four.
| Tier | Example | Response time | Action |
|---|---|---|---|
| SEV-4 | Wrong tone in a draft, bad formatting | Next business day | Log it, tweak the prompt |
| SEV-3 | Agent ignores a rule once (e.g., books a meeting outside hours) | Same day | Review logs, add a guardrail |
| SEV-2 | Wrong external message sent to a customer or vendor | Within 1 hour | Pause agent, send correction, investigate |
| SEV-1 | Data exposure, credential leak, unauthorized spend or deletion | Within 15 minutes | Full kill switch, revoke keys, notify |
The rule that matters: anyone on your team can declare SEV-1 and pause the agent without asking permission. A false alarm costs you an hour of automation. A hesitant human costs you the weekend.
2. Build the Kill Switch First (and Test It Monthly)
A playbook is only as good as your ability to execute step one. Your agent needs a layered kill switch, because a single off button fails exactly when you need it.
Layer 1: Pause the agent process
On a Mac Mini running OpenClaw, this is a single command to stop the agent's service, plus a one-tap shortcut on your phone that runs it over SSH. Write the exact command in the playbook, not a description of it. Mine is a literal line you can copy and paste: launchctl unload against the agent's service file.
Layer 2: Cut outbound access
Pausing the process does not help if a queued job fires later. Keep a firewall rule ready that blocks the machine's outbound traffic except to your management connection. This is also the step that stops a compromised agent from phoning home.
Layer 3: Revoke what it holds
List every account the agent can touch: email, calendar, CRM, payment tools, messaging apps, any cloud model API key. For each one, record where to revoke it and who has admin rights to do so. I have seen teams discover mid-incident that the only person who could revoke the CRM token was on a flight.
Test it monthly. Schedule 15 minutes on the first Monday: pause the agent from your phone, confirm it stopped, restart it. In our deployments, the first drill typically exposes at least one broken step (an expired SSH key, a missing admin login, a shortcut that points at the wrong service). Better to find that on a Monday than during a breach.
3. Create a Permission Inventory, the Document That Shrinks Your Blast Radius
You cannot contain what you have not listed. Before any incident, build a one-page table of every permission your AI worker holds. For each row, answer four questions: what can it read, what can it write, can it spend money, and can it delete?
- Email: read all, draft only, or send autonomously? Draft-only is the safest default for the first 30 days.
- Calendar: create and edit events, but no deleting other people's meetings.
- CRM: update fields, but no bulk export and no record deletion.
- Payments: ideally none. If it needs spend authority, set a hard cap such as $200 per day.
- File system: a sandboxed working folder, not your whole home directory.
This is where the local-first approach pays off. When the agent runs on a Mac Mini in your office, your prompts, customer data, and logs never sit on a third-party vendor's servers, so a vendor-side breach cannot expose them. That removes an entire class of incident from your playbook. It does not remove the need to lock down the machine itself, which is why the inventory still matters. If you are also tightening your content pipeline, our guide on rewriting your SEO content strategy for Google's AI content crackdown covers how to keep human review in the loop for published output, the same principle applied to marketing.
4. Write the Two Playbooks: Misbehavior and Breach
These are different incidents with different first moves. Do not merge them.
Playbook A: The model misbehaves
Misbehavior means the agent is doing something wrong, but nobody else is in control of it. Hallucinated facts, ignored instructions, runaway loops, and a prompt injection hidden in an email that redirects its behavior all land here. Your steps:
- Minute 0 to 1: pause the agent (Layer 1).
- Minute 1 to 15: pull the action log for the last 24 hours and list every external action: emails sent, records changed, files touched, money moved.
- Minute 15 to 60: reverse what you can, and send corrections to anyone who received wrong information. Short and plain: "We sent you an incorrect message earlier today. Here is the correct information."
- Hour 1 to 24: identify the trigger. Was it a new prompt, a model update, a poisoned input, or a missing guardrail? Reproduce it in a test environment before you restart.
- Restart only with a fix: never resume the agent on the same configuration that failed.
A note on model changes: if you swap between models such as Claude Sonnet 4.6, GPT-5.5, or a local Llama 4 Scout, behavior shifts in ways your old prompts did not anticipate. Treat every model change as a mini-deployment with a test run, and keep the previous configuration so you can roll back in minutes.
Playbook B: The breach
A breach means someone else may be in control, or data has left. Your priorities flip from "fix the behavior" to "stop the access and preserve evidence."
- Minute 0 to 5: pause the agent and cut outbound network access (Layers 1 and 2). Do not wipe the machine yet; you need the logs.
- Minute 5 to 15: revoke every credential on your permission inventory, starting with email and payments. Rotate any cloud model API keys.
- Minute 15 to 60: snapshot the disk and copy the logs to a separate, offline location.
- Hour 1 to 24: determine what was accessed. The permission inventory tells you the worst case; the logs tell you the actual case.
- Hour 24 to 72: notify affected parties as required by your contracts and applicable state or federal rules. If you hold customer data in Texas or elsewhere, check your legal notification deadlines now, before you need them.
Why 15 minutes for credentials: stolen API keys are commonly abused quickly once exposed. Treat any key that touched the agent as burned the moment you suspect a breach, and rotate it without waiting for proof.
5. Logging: The Part You Cannot Retrofit
Every incident investigation I have run came down to one question: do we have the logs? If you do not log it before the incident, you cannot reconstruct it after.
Your agent should record, at minimum:
- Every inbound message or input it processed, with timestamp and source.
- Every tool call, with parameters and results.
- Every external action: sent message, record change, file write, payment.
- The model name and configuration version in use at the time.
Store logs on a separate volume or an append-only location so a compromised agent cannot erase its own tracks. Keep 90 days as a baseline. A local Mac Mini with a 1 TB drive can hold months of text logs for a small team with room to spare, since text is tiny. This is one place local hardware beats the cloud: you decide retention, and you never wait on a vendor's support ticket to export your own records.
6. Run the Post-Incident Review Within 72 Hours
The playbook is not finished when the agent restarts. It is finished when the review is written. Use a blameless, one-page format:
- What happened, in timestamps.
- How we detected it, and how long that took.
- What the kill switch did, and where it was slow or broken.
- Root cause in one sentence.
- Three fixes, each with an owner and a due date.
Then update the playbook itself. Every real incident should change at least one line of it. And rehearse: run a 30-minute tabletop drill each quarter where you describe a scenario ("the agent emailed our price list to a competitor") and walk through the steps out loud. Time yourself against the 60-second and 15-minute targets.
If you are building your agent stack from scratch, browse the rest of our Clawticles library for setup, cost, and integration guides, and design the permission inventory before you connect the first account.
FAQ
What is an AI worker incident playbook?
It is a short written runbook that tells you how to stop, contain, investigate, and recover when an AI agent misbehaves or its credentials are compromised. It names an owner, defines severity tiers, lists exact kill-switch commands, and sets a timeline for notifying customers.
How fast should I be able to shut down a misbehaving AI agent?
Aim for under 60 seconds to pause the agent and under 15 minutes to revoke every credential it holds. If you cannot do both from your phone, the playbook is not finished.
Does running AI locally on a Mac Mini reduce incident risk?
Yes, in specific ways. Local-first agents keep prompts, logs, and customer data on hardware you control, so a vendor breach cannot expose them. You still need to secure the machine, any API keys for hybrid cloud models, and the connected business accounts.
How often should I rehearse the playbook?
Run a 30-minute tabletop drill every quarter and a live kill-switch test every month. Teams that never rehearse tend to discover broken revoke steps during a real incident.
Get an AI Worker That Ships With Its Own Playbook
BuildAClaw sets up OpenClaw agents on your own Mac Mini hardware, with scoped permissions, full action logging, and a tested kill switch from day one. No cloud dependency, no mystery about what your agent can touch. Book a free call and we will map your permission inventory together.
Schedule a Free Strategy Call →