Agent Auth Gateway v1.0

Guides / 7 min read

An Incident Response Runbook for AI Agents: The First Hour

Published 2026-11-14 · Reviewed 2026-11-14 · By the Ingenious AI team

Agent incidents feel novel, which tempts teams to improvise. They are not novel: something is acting wrongly at machine speed, money or data is moving, and the same five moves, in the same order, contain almost all of them.

The short answer

Run the first hour in five moves. Stop: kill or lock the agent at the gateway so no further calls are mediated. Preserve: freeze the audit log segment, the run's inputs and its sandbox before anything rotates. Attribute: identify the agent, run and triggering input from the decision log. Decide: with the owner named, classify the event — loop, injection, misuse or defect — and choose the release conditions. Release: only against those conditions, with tightened policy attached. Improvisation is what teams do instead of the second move, and it is why so many postmortems end with 'logs were no longer available'.

Check your own setup as you read: run the free Spend Guard self-check or test a policy in the playground — five minutes, no signup, and the gaps it names map to the controls below.

Worked example: 58 minutes from alert to contained

At 02:12 on a Tuesday, the anomaly alert for a fictional logistics firm, Kestrel Freight Lines, fired: its document agent's burn rate was nine times baseline. The on-call followed the runbook. 02:14 — agent locked at the gateway, spend frozen at $63.20 for the night. 02:19 — log segment and the run's input folder preserved. 02:31 — attribution complete: a carrier's rate-sheet PDF contained an instruction block directing the agent to re-extract every historical rate sheet 'for completeness' — 14,000 documents queued, 1,900 processed. 02:47 — classified as injection via document, not a defect. 03:10 — release conditions set: that carrier's documents quarantined to approval-only, extraction step budget halved.

Total damage: $63.20 in spend, no data left the building, no customer impact, and a postmortem written from records rather than memories. Kestrel contrasted it with an incident eight months earlier, pre-runbook, where the same class of event ran for 11 hours and $890 because the first responder spent the opening hour deciding whether it was 'really an incident' while the agent kept working. The runbook's real product is not speed — it is removing that first hour of deliberation.

Stop first, understand second

Every minute spent diagnosing a live agent is a minute it spends. The kill switch and lockdown exist precisely so diagnosis can happen at human speed: lock the agent, confirm the gateway is refusing its calls, and only then open the logs. This ordering feels backwards to engineers trained to observe before acting, so write it into the runbook as a rule with no exceptions, and protect whoever follows it — the person who stops a production agent at 2 a.m. on a false alarm has done their job, not broken something.

Preserve evidence before it rotates

Agent systems are full of rotating state: transcripts, tool outputs, temporary files, short-retention logs. The second move is to freeze the decision-log segment for the window, the run's inputs and configuration, and the policy version in force. Kestrel's attribution was possible because the input PDF was preserved before the document pipeline's 24-hour cleanup. Decide in the runbook, in advance, what gets preserved and where it goes — nobody designs a good evidence procedure mid-incident.

Attribute from decisions, not from vibes

With the agent stopped and evidence frozen, the decision log answers the factual questions in order: which agent, which run, which actions, which rules allowed them, what did the burn curve look like, and what input started it. Classification follows from that record: a loop shows repetition, an injection shows an instruction-bearing input, misuse shows a credential where it should not be, a defect shows a code path doing exactly what it was told. Each class has a different fix, which is why guessing the class early is expensive.

Release is a policy change, not a restart

An agent released unchanged will re-meet the condition that stopped it, sometimes within the hour. Release conditions should name the tightened policy — lower caps, a new approval rule, a quarantined source, a halved step budget — the owner who approved release, and the watch period afterwards. Record the whole incident against the agent's registry entry, so the next responder inherits the history instead of rediscovering it.

After the first hour: the review that makes the next one shorter

Within a week of any incident, run a blameless review from the preserved record: timeline from the log, the decision points, where the runbook helped and where it was silent or wrong. Every gap found becomes a runbook edit or a policy change with an owner and a date — a review whose actions are 'be more careful' has produced nothing. File the review against the agent's registry entry and link it from the incident record. Over a year, these reviews are the fleet's real security documentation: not intentions, but a dated account of what actually failed and what was actually changed in response.

The first-hour runbook, in five moves

  1. Stop: lock or kill the agent at the gateway and confirm its calls are being refused.
  2. Preserve: freeze the decision-log segment, the run's inputs and sandbox, and the policy version in force.
  3. Attribute: from the log, name the agent, run, triggering input and the rules that allowed each action.
  4. Decide: classify — loop, injection, misuse or defect — with the agent's named owner, and set release conditions.
  5. Release: only under tightened policy, with an owner-approved release record and a defined watch period.

Source note and related guides

Figures in the worked example are illustrative, drawn from a fictional company created for this guide; the controls, failure patterns and procedures described are the gateway's documented behaviour — see the Agent Auth Gateway documentation and the policy patterns in allowlists vs denylists, spend caps and the agent kill switch. Reviewed by the Ingenious AI team, 2026-11-14.

Sources

  • NIST AI Risk Management Framework (AI RMF 1.0), the voluntary framework for managing AI risk across design, development and use: nist.gov, 2023
  • OWASP Top 10 for Large Language Model Applications, the OWASP GenAI Security Project's risk list for LLM and agent systems: owasp.org, 2025
  • RFC 6749, The OAuth 2.0 Authorization Framework, the IETF standard behind scoped, expiring access tokens: rfc-editor.org, 2012

Frequently asked questions

What is the first thing to do in an AI agent incident?

Stop the agent — lock or kill it at the gateway and confirm calls are refused — before diagnosing. Diagnosis at human speed is only safe once the agent is no longer spending or acting.

Why preserve logs and inputs so early?

Because agent systems rotate state quickly: transcripts, tool outputs and short-retention logs disappear on schedule. Kestrel's injection was attributed because the input document was frozen before a 24-hour cleanup ran.

How do I tell a loop from a prompt injection?

From the decision log. A loop shows the same actions repeating against the agent's own logic; an injection shows an instruction-bearing input — a document, email or tool result — immediately before behaviour changed. The fixes differ, so classify from records.

Who should be able to stop an agent?

Whoever is on call, from a phone, in seconds — and they must be protected when a stop turns out to be a false alarm. A stop authority people are afraid to use does not exist in practice.

When should a stopped agent be released?

Only against written release conditions: the tightened policy that addresses the cause, a named owner approving, and a watch period. Restarting unchanged invites the same incident to recur.

Governing agents in production?

Spend caps, approval queues, policy simulation, burn forecasting, and step-up lockdowns — all built into the gateway. Free tier to start. Or test policies in the playground with no signup.

Share this: X Facebook LinkedIn WhatsApp
← How to Allocate AI Agent Costs to Teams … All guides Budget Tripwires: The Warning Layer Betw… →