DEEP DIVE AI Security Incident Response Local AI

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.

TierExampleResponse timeAction
SEV-4Wrong tone in a draft, bad formattingNext business dayLog it, tweak the prompt
SEV-3Agent ignores a rule once (e.g., books a meeting outside hours)Same dayReview logs, add a guardrail
SEV-2Wrong external message sent to a customer or vendorWithin 1 hourPause agent, send correction, investigate
SEV-1Data exposure, credential leak, unauthorized spend or deletionWithin 15 minutesFull 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?

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:

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."

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:

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:

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 →