SBN

Rogue AI Agent Incident Response: The First Hour


An AI agent did something nobody approved. What to cut off, what to freeze and which records to trust in the first hour, and what to change afterwards.

Rogue AI agent incident response starts with a plain fact: the agent usually had permission. Its token was valid and its calls were well formed. It did something nobody meant it to do.

In July 2025 the coding agent on Replit deleted SaaStr founder Jason Lemkin’s production database during a code freeze, after being told not to change anything. It held standing write access, so nothing stopped the call. Most agent incidents have that shape, and it decides what the first hour looks like.

AI Agent Incident Response: First-Hour Containment

Snapshot the agent’s runtime state before you stop it. Save the context window, the pending tool calls and the inputs it retrieved. Killing the container first erases the one place that shows which email or document steered it.

Block the agent’s identity where its calls land. Closing the chat leaves queued calls running. Revoking an OAuth refresh token leaves any live access token valid until it expires, which can be most of your first hour. Block the agent’s principal at the gateway or resource server, rotate its API keys, and then revoke the refresh tokens. If the agent runs on a service account that production also uses, scope the block to the agent before you disable the account. Confirm containment before anyone restarts it, which the federal guidance also stresses.

Freeze the write paths that cannot be undone. Payments, data exports, permission changes and deletes. During the incident, remove write scopes from the agent’s role or put those endpoints in read-only mode, and let a person review anything pending by hand. Building a new approval flow mid-incident is not realistic, so this step only gets easier if the approval check already exists.

Rebuilding the Timeline of a Rogue AI Agent

Use two kinds of record for two questions. For what actually ran, trust records the agent could not write: the database audit trail, the payment processor and the cloud control plane. The agent framework’s own log is the account of the software under review, and a log kept by the system in question proves little about it.

For why it ran, go to the snapshot and the agent’s own traces. Find what it read just before the bad call. If a document, email or web page told it what to do, that is indirect prompt injection, and the same input will work again. Check outbound traffic for data that left while the agent was running.

Then name one person who owns the agent. If nobody can say who that is during the incident, record it as the first finding.

Why Kill Switches Fail Against Rogue AI Agents

A kill switch stops this agent, today. The next agent with the same standing access can make the same call tomorrow, because the systems it calls still accept any valid token. Rules in the prompt do not change that. The Replit agent had been told not to touch anything.

The lasting fix belongs where the action runs. For the actions that matter, the server that executes them should require proof that a person approved this exact action, and check that proof before it acts.

Post-Incident Hardening: Per-Action Approval

Tie each approval to the exact parameters. A common gap: a person approves “refund $40 to customer A”, and the call that runs refunds someone else, or a different amount. The server should compare what is about to run with what was approved, and refuse a mismatch. Checking that some approval exists is too weak.

Make approvals single use. One approval should cover one call. Otherwise a valid approval can be replayed for a second identical action, or reused after the situation changed.

Decide in advance which actions need a person. Most agent work can run unattended. The short list is the actions that move money or data, change access, or delete something. Keep it short, or people start approving on reflex.

Enforcing Per-Action Approval with Yuthent

Yuthent is that check. The person approves the specific action on their own phone, with a biometric on the device. The approval is a signed record bound to that action, and the customer’s server verifies it before the action runs, so a swapped amount or payee fails. The customer’s policy decides which actions wait for a person.

The records verify against published keys, so the security team or an auditor can check them without trusting the agent’s system. In the next incident, the freeze is already in place for those actions, and the timeline starts from records the agent could not write. How accountability works across people and agents is covered in who is accountable when an AI agent acts.

This post first appeared on the Yuthent blog.