Short answer: When an agent behaves unexpectedly, stopping the chat is not enough. An enterprise response needs containment, preserved evidence, a decision on rollback, and a controlled return to service.
Treat the agent as an operational system
An incident may be a wrong answer, an unauthorized tool call, a duplicate write, leaked sensitive context, a stale knowledge source, or a failed escalation. Classify the event by business impact, not by how convincing the output sounded. A response that looks helpful but changes the wrong customer record is an operational incident.
Before production, name the incident owner, technical owner, privacy or security contact, and business approver. Document how to pause a model, revoke a credential, disable a tool, switch to a manual queue, and notify affected teams. These controls should work without asking the agent to diagnose itself.
A four-stage response
1. Contain
Stop the narrowest risky capability first: disable a write tool, freeze outbound messages, or route new cases to a human. Preserve access to the system of record for authorized investigators. Avoid deleting logs before their retention and legal requirements are understood.
2. Preserve evidence
Keep the request, relevant model or policy version, retrieved sources, tool arguments, authorization decision, timestamps, reviewer actions, and confirmed system result. Redact copies used for analysis. A final answer alone cannot show whether the failure came from retrieval, policy, permissions, orchestration, or a downstream system.
3. Diagnose and decide
Reproduce with a safe fixture, not live personal data. Compare the last known good configuration with the failing version. Ask whether the source changed, a permission expired, a retry duplicated an action, or an instruction caused the agent to leave its task contract. Record the evidence and the decision owner.
4. Recover and learn
Rollback to a tested configuration or keep the workflow manual until the cause is understood. Re-run acceptance cases, including the failure that triggered the incident, before re-enabling the capability. Update the runbook, test set, access review, and monitoring signal; do not close the incident because output quality appears normal again.
Rollback is more than reverting a prompt
Version prompts, models, retrieval indexes, tool schemas, policy rules, and configuration together. Define which changes are reversible and which create external side effects. For a duplicate payment, message, or record update, a prompt rollback cannot undo the business action. The runbook needs a compensating procedure owned by the system-of-record team.
Test a lost response after a successful write, a revoked credential, a stale document, a provider timeout, and a repeated event. The expected outcome may be an alert and human handoff rather than another retry. Keep an emergency read-only mode available when the workflow still provides useful context without execution rights.
Incident acceptance checklist
| Check | Evidence |
|---|---|
| Detection | Alert identifies the workflow, version, and impact |
| Containment | Tool, account, or route can be disabled independently |
| Investigation | Trace connects input, source, decision, tool, and result |
| Recovery | Tested version and manual fallback are available |
| Review | Owner records root cause, remediation, and re-test |
Do not use an aggregate success rate as proof that a severe failure is acceptable. Segment high-impact actions, privacy events, and repeated errors separately. A small number of critical failures can justify keeping autonomy disabled.
What to ask a delivery partner
Ask for the incident runbook, log fields, versioning approach, rollback demonstration, escalation ownership, and evidence from failure tests. Confirm what your team can operate independently and what requires vendor access. A managed implementation can help design these controls, but the business still owns its approval, privacy, and continuity decisions. See Faltara's AI agent development service for a scoped technical discussion.
Frequently asked questions
Should we shut down the entire agent platform?
Not always. Contain the affected workflow or capability when isolation is reliable; use a broader shutdown when the boundary is unknown or the incident may cross workflows.
Are logs enough to prove what happened?
Only if they connect the request, evidence, policy decision, tool call, authorization, and confirmed outcome. A transcript without system events is incomplete.
When can we resume?
After containment, a documented cause or risk decision, a tested configuration, and a re-run of the relevant acceptance suite with an accountable owner.
Is rollback a compliance guarantee?
No. Rollback is an operational control. Legal and regulatory duties depend on the facts, jurisdiction, data, and sector and require qualified review.
Boundary: Examples are illustrative. Do not claim that an agent is compliant, safe, or fully reversible without evidence from the actual deployment.
Prepare an incident runbook before launch
Write the first page of the runbook while the workflow is still in design. It should name the person who can pause the workflow, the person who owns the affected system, the security or privacy contact, and the business approver. Include the exact control to disable: a tool, service identity, outbound channel, queue consumer, or model route. A vague instruction to “turn off AI” is not an executable control.
Define severity using consequences. A wrong summary may require correction; an unauthorized payment attempt, exposed health record, or repeated customer message may require immediate containment and notification. Record the evidence needed at each level and the time at which the incident must be escalated. Do not use a public status page or an agent-generated explanation as the sole source of truth.
Distinguish attempted, authorized, and completed actions
During investigation, separate four events: the agent requested an action, policy authorized it, a tool sent it, and the system of record confirmed the result. These events can diverge. A lost response may make a successful write look like a failure and cause a duplicate retry. A refusal in the conversation may still be accompanied by an accepted downstream call if the gateway is misconfigured.
The trace should include correlation ID, workflow and policy versions, source documents, tool arguments, authorization decision, response code, and final record state. Redact copies used for analysis and restrict raw data access. Keep a hash or immutable reference where the organization requires tamper evidence.
Recovery drills that expose hidden dependencies
Run a short tabletop exercise before production. Revoke the service identity, disable a provider, return a timeout after a successful write, and introduce a stale policy document. Ask the team to route work manually, preserve evidence, communicate internally, and restore a tested version. Measure how long it takes to identify the owner and whether the manual queue can absorb the volume.
Test recovery with a fixture rather than live personal data. Confirm that retry logic uses an idempotency key or checks the system of record first. For outbound communication, make the safe mode draft-only until a reviewer confirms the recipient, content, and channel.
Change approval after an incident
Do not close an incident by changing the prompt and observing one successful example. Write the suspected cause, affected scope, evidence, remediation, and residual risk. Add a regression case to the acceptance suite. Require an owner to approve the change and schedule a review after the workflow has processed a representative sample. If the cause is unknown, keep the capability narrow or disabled.
Questions for an implementation partner
Ask to see a redacted incident trace, a rollback exercise, and the boundary between the partner’s responsibility and your system owners. Confirm how you can export configurations, revoke access, and operate the manual fallback without vendor intervention. A credible partner will identify what cannot be guaranteed and will not describe a rollback plan as regulatory compliance.
