Reversal is an engineering problem, not a model problem
Recovery from an agent action depends mostly on what your systems recorded and what they can enforce, not on how the model behaved. Tool-call logging, agent identity, least-privilege permissions, and approval gates need to exist before an incident, because they determine how quickly you can find, contain, and undo what an agent did.
Classify agent actions by reversibility
Start by classifying each agent-invocable action into one of these categories:
- Reversible: the action can be undone.
- Compensable: the action cannot be undone directly, but its effect can be offset.
- Irreversible: the action cannot be undone.
Some actions can only be partially mitigated, so your classification should record that as well. Knowing the category in advance tells you what to expect during recovery and where stronger controls are needed.
Controls that must exist before the incident
These controls need to be in place before an agent acts, not added afterward:
- Tool-call logging: a record of the parameters, acting agent identity, session context, and downstream response for each call.
- Agent identity: each action is attributable to a specific agent.
- Least-privilege permissions: each agent can reach only the tools and access it needs.
- Approval gates: high-impact actions are enforced at runtime rather than only in policy documents.
Respond in a fixed sequence when an agent has already acted
When an agent has already acted, work through the same five steps each time.
Agent incident response sequence
- ContainSuspend the agent's credentials or tool access.
- ScopeRebuild what happened from tool-call records.
- Reverse or compensateUndo what can be undone and offset the rest.
- VerifyConfirm downstream state matches the intended outcome.
- DocumentRecord findings and close control gaps.
Tradeoffs and limits to plan for
Not every action can be fully undone. Reversal covers what can be undone, compensation offsets the rest, and some actions can only be partially mitigated or are irreversible. Plan for these limits when you classify actions, and place approval gates where the cost of a mistake is hardest to recover.
The scoping step also depends on the records you already have. If tool-call logs do not capture parameters, agent identity, session context, and downstream responses, you cannot reliably rebuild what happened.
Readiness questions for your team
- Can we reconstruct, per tool call, the parameters, acting agent identity, session context, and downstream response?
- Do we know which agent-invocable actions are reversible, compensable, partially mitigable, or irreversible?
- Are approval gates for high-impact actions enforced at runtime rather than only in policy documents?
- Can we suspend one agent's credentials or tool access without disrupting other agents or systems?
- Do we have a documented contain, scope, reverse or compensate, verify, and document sequence that has been exercised?