AI agent incident response: stop, reconcile and recover
A practical runbook for app teams to contain unintended AI actions, establish what actually happened and restore automation safely.
By AppCradle · Published

An AI incident needs an operator who can stop execution, a record of the actions that actually happened and a clear decision about restarting. A better prompt can be part of the repair. It cannot undo a notification already delivered or establish whether a timed-out operation completed.
On October 12, 2026, the UK government announced work with the National Cyber Security Centre and AI Security Institute on responding to incidents involving autonomous AI agents, alongside consideration of reporting significant incidents and near misses. These are developing proposals and preparations; the announcement does not establish a universal reporting requirement for every app. Read the government announcement.
For product teams, the useful question is immediate: if your agent starts doing the wrong thing today, who can stop it and how will you account for its effects?
This article proposes a runbook for a fictional app with an agent that prepares and dispatches customer notifications. It complements our AI agent permissions guide, which focuses on preventing unintended actions. Adapt the responsibilities and recovery gates to your own system before an incident occurs.
Define the incident by its effects
Suppose the notification agent selects the wrong audience and starts dispatching messages. Some jobs remain queued, some have provider receipts and others timed out. The agent's final response says the campaign failed. That statement does not settle whether customers received anything.
Open an incident when observed behavior crosses a defined boundary: unauthorized access, an unintended external action, sensitive information exposed to an unexpected destination or loss of control over execution. Keep a blocked attempt as a near miss when evidence shows the boundary held. Investigate uncertainty instead of classifying it as harmless.
For this example, use the following triage questions. They are proposed operating criteria, not a universal severity standard.
| Question | Evidence to seek | Immediate implication |
|---|---|---|
| Can the workflow still act? | Worker activity, scheduled jobs and tool authorization | Contain the active execution paths |
| What may have left the app? | Message payload references and provider receipts | Assess recipients and data exposure |
| Which operations have uncertain outcomes? | Timeouts, missing receipts and incomplete callbacks | Hold retries pending reconciliation |
| Did the boundary fail for other workflows? | Shared credentials, policies and affected versions | Expand containment where the same failure can recur |
Appoint an incident lead, an operator responsible for containment, an investigator responsible for the evidence record and an owner for customer communication. A small team can combine these roles, but name the people and the decisions they own.
This preparation fits the broader approach in NIST SP 800-61 Revision 3, which integrates incident response with ongoing cybersecurity risk management. OWASP also publishes a GenAI Incident Response Guide for security practitioners working with generative AI applications.
Stop execution at the boundary that can act
For the notification example, the containment owner should block new dispatches at the service that authorizes and submits them. Closing the chat interface or changing the agent's instructions is insufficient if workers already hold queued jobs.
Use a prepared checklist of every execution path: interactive requests, scheduled campaigns, queue consumers, automatic retries and callbacks that can launch follow-up work. Record which paths are disabled, which remain active and why. Keep a manual support route available if it can operate safely with separate permissions.
Where compromised or overly broad credentials are involved, revoke or restrict the affected access. Check what token revocation actually invalidates in your integration, including outstanding sessions and separately issued credentials. If several services share a credential, document the dependency and the wider interruption caused by revoking it. Do not delay urgent containment simply to achieve a cleaner evidence capture.
A useful containment check is a synthetic dispatch attempt against a controlled test destination through each disabled entry point. Confirm that the execution boundary rejects it and that no downstream request occurs. Also inspect already running work: blocking new submissions does not recall requests the provider has accepted.
Record the containment time and the evidence supporting it. “Pause button clicked” and “no remaining execution path can submit this action” are different operational states.
Preserve enough evidence to reconstruct the sequence
Create a restricted incident record before routine retention or deployment changes erase useful context. For each affected operation, retain references to the business operation identifier, attempt identifiers, relevant timestamps, tool invocation, authorization decision and downstream receipt. Record the deployed application, model, prompt, tool-policy and retrieval configuration versions where available.
Preserve the relevant retrieved material if it may explain the behavior. Treat that material as untrusted evidence: an investigator should not paste suspicious instructions into another privileged agent and ask it to execute a reproduction.
Separate the evidence repository from product analytics. The OWASP Logging Cheat Sheet recommends excluding or protecting sensitive material such as access tokens and personal information. Apply access controls and retention decisions to the incident record; do not copy entire customer conversations into a broadly accessible debugging dashboard. Collect raw content only when necessary and authorized for the investigation.
Our location privacy article discusses a related design choice: collecting less sensitive information reduces what your team must later trace, protect and explain. That remains useful when an AI workflow is the component that mishandles the information.
Reconcile each operation before retrying
The investigation owner should build an affected-operations ledger using authoritative business records and provider evidence. Keep the agent's narrative as context, not as proof of completion.
For the fictional notification incident, a compact ledger might use these states:
| Observed state | Next action |
|---|---|
| Queued, with no dispatch attempt | Quarantine the job and decide whether it remains valid |
| Submitted, provider acceptance confirmed | Track the provider's final outcome; do not resubmit as a new operation |
| Delivery confirmed | Record the actual recipient and content involved in the restricted evidence record |
| Failure confirmed with no external effect | Consider a separately reviewed retry after the cause is fixed |
| Outcome unknown after timeout | Query downstream records or escalate to the provider before taking another action |
Add an owner, supporting evidence reference and next decision to each unresolved row. Make uncertainty visible. An HTTP timeout describes what the caller observed; it does not prove that the external service did nothing.
Keep the original business operation identity across attempts where the downstream integration supports deduplication. Verify the provider's actual idempotency rules and retention window before relying on them. Our RCS delivery and fallback article explores the same problem when several delivery routes can serve one message.
A local database rollback cannot retract a delivered notification. Similarly, a compensating action is a new business action with its own authorization and possible consequences. Decide whether a correction, cancellation or manual customer follow-up is appropriate. Do not ask the original agent to repair every affected record without review.
Establish the cause without guessing intent
Start with the earliest divergence between the approved task and observed execution. In this example, the wrong audience could result from an authorization defect, stale campaign data, an incorrect tool parameter, retrieved instructions treated as authority or a retry that reused the wrong context.
Compare the affected execution with a known-good version and reproduce the failure using synthetic data in an isolated environment. Keep the model, tool definitions and relevant configuration recorded so the test has a meaningful relationship to the incident. If a provider does not expose a reproducible model version, record that limitation and test the enforceable application boundary independently.
Maintain separate entries for confirmed findings, working hypotheses and unanswered questions. A prompt-injection hypothesis is not proof that an attacker caused the incident. Equally, an ordinary orchestration bug still deserves a repair if it let the agent reach the wrong customers.
Choose the fix at the failed boundary. An audience-scope authorization error needs a server-side enforcement change. A confusing model instruction may also need revision, but it should not carry the entire protection against unauthorized dispatch.
Restore service with explicit gates
The incident lead should approve a staged recovery only after the team can explain what changed and how to stop the workflow again. For this notification scenario, require:
- A regression case that reproduces the unsafe audience selection and proves dispatch is rejected.
- An accounted-for backlog: each held job is cancelled, still valid or assigned for review.
- Reconciliation of external effects, with unresolved cases isolated from automatic retries.
- Working alerts and an exercised stop control for every execution path being restored.
- A named release owner and written conditions for pausing again.
Begin with preparation-only operation if the workflow supports it: the agent proposes a campaign while an operator reviews the audience and delivery request. Restore a limited set of authorized writes after the evidence supports that step. Widen access only after observing the agreed outcomes.
Do not use a low model error rate as the sole recovery criterion. Track unauthorized actions, duplicate effects, unresolved outcomes and the time required to contain execution. Review cost per successful AI task separately; cheap, successful model calls can still produce an expensive operational incident.
Communicate what is known and rehearse the next response
Give customer-facing teams a short factual brief: the affected feature, confirmed impact, current restrictions, available workaround and time of the next update. State what remains under investigation. Avoid claims such as “no data was affected” unless the evidence supports that scope.
Assign a responsible privacy or legal owner to determine any applicable notification duties from the actual facts and jurisdictions. The UK announcement is context for preparedness, not a substitute for that assessment.
After recovery, run a tabletop exercise with synthetic records. Introduce a wrong-audience request, a timeout after provider acceptance and a queued job created before access was revoked. Ask the on-call team to demonstrate containment, identify the uncertain operation and restore only the jobs still authorized to run.
Keep the resulting runbook short enough to use during an outage. Its first page should name the stop controls, responsible people, evidence location and restart gates. The test of readiness is whether a colleague can follow it and account for the workflow's real effects without relying on the agent to explain itself.
See the bigger picture.
Bring your store reports together and spend more time understanding what they mean.
Try for free