Before giving an agent more autonomy, label every tool it uses by whether its effect can be reverted, compensated, or not undone at all. Ask a human to approve only the irreversible ones, and for the rest, record the inverse operation at the moment the tool runs.
Why it matters now
On November 16, Gartner published a survey of 298 infrastructure and operations leaders in the US and UK, run between June and July 2026. Three numbers stand out:
- 95% had at least one agent-related incident in the past 12 months.
- 70% believe their agents already operate within safe boundaries.
- Only 15% have automatic circuit breakers to stop an agent stuck in a loop or chaining errors.
One of its recommendations is to set escalation boundaries by risk level and require human approval for high-impact actions. The practical question is which actions those are. If the answer is “all of them”, the agent stops saving you any work.
In The agent proposes, the human decides I already split actions into reversible and irreversible. Here I go one level deeper, because between those two extremes there’s a third class, and it’s the one people forget.
The three classes of tools
Tian Pan lays this out in “The Agent Undo Button Is a Saga, Not a Stack”. His point: undoing what an agent did across several tools doesn’t work like Ctrl+Z in a text editor. Each call hits a different system with its own rules, and some trigger reactions from people. It’s a saga problem, the distributed-systems pattern where every step has an action that compensates for it if something fails later.
He proposes that every tool declares one of three classes:
- Cleanly reversible. An inverse call erases the effect completely. Deleting a draft the agent created, or writing back a field’s previous value. According to Pan, these are rarer than they look.
- Compensable, with residue. You can’t erase what happened, but another action brings the business back to a valid state. A charge is fixed with a refund; a cancelled booking frees the slot again, but the customer already got the cancellation notice. The compensation has side effects of its own.
- Non-reversible. No call neutralizes it: an email someone already read, a text that prompted a phone call, a transfer past its reversal window. All that’s left is a message written by a person acknowledging the mistake.
Microsoft’s documentation on the Compensating Transaction pattern says the same from classic architecture: a compensating transaction “doesn’t necessarily return the system data to its state at the start of the original operation”.
How to apply it
Take a booking agent for a beauty salon or a small clinic. This is an example to illustrate the method, not a real case.
1. Take inventory. One row per tool and its class:
- Check open slots: read-only, no class needed.
- Create a tentative booking: reversible, it gets deleted.
- Move an appointment: compensable, the customer gets the change notice.
- Charge the deposit: compensable, with a refund.
- Send the customer a WhatsApp message or an email: non-reversible.
2. Declare the class in code, next to the tool. The tool registry is the source of truth, not a separate document nobody updates.
3. Compute the inverse when you execute, not when you undo. If the agent moves an appointment from 10:00 to 12:00 and you want to revert it tomorrow, reading the appointment then won’t help: the receptionist may have changed it again. The inverse is stored at that same moment, with the value that was there.
const moveAppointment: Tool<{ appointmentId: string; newTime: string }> = {
class: "compensable",
async execute({ appointmentId, newTime }) {
const before = await appointments.read(appointmentId); // today's state, not tomorrow's
await appointments.update(appointmentId, { time: newTime });
return {
result: { appointmentId, newTime },
inverse: { tool: "moveAppointment", args: { appointmentId, newTime: before.time } },
};
},
};
4. Put approval in one place. Every call goes through the same function. Non-reversible ones wait in a queue until someone says yes; everything else runs and lands in a journal with its inverse.
async function call(name: string, args: unknown) {
const tool = registry[name];
if (tool.class === "non-reversible") {
return requestApproval({ name, args }); // waits for a person
}
const { result, inverse } = await tool.execute(args);
await journal.save({ name, args, class: tool.class, inverse, at: new Date().toISOString() });
return result;
}
5. When in doubt, non-reversible. In Pan’s words: “If a tool author cannot answer the question, the safe default is non-reversible.” A tool wrongly labeled as reversible is a false promise to your customer.
6. When you undo, say what’s left. There are three possible outcomes: fully reversed, reversed with residue (and which), or not reversible, with what a person needs to do next. A single “undone” message hides exactly what you need to know.
My take
What I like most about this classification is that it cuts approvals instead of multiplying them. If an agent asks permission for every step, within a week you’re approving without reading, and that’s worse than no approval at all. With three classes, a person’s “yes” is saved for what truly can’t be fixed: the message to the customer, the money that won’t come back.
In a small business I wouldn’t start with a saga orchestrator. I’d start with the table and the journal: ten or fifteen tools with their class, and a table where every action stores its inverse. It’s little code, and from day one it tells you what the agent can break without asking and lets you revert it without reconstructing what happened.
From the Gartner report, the number I keep is the gap between the 70% who trust their agents and the 15% who can stop them automatically. Keep in mind it’s a survey of large organizations, and it says nothing about how many incidents a small business has with a customer support agent. I don’t know that. But trusting before being able to brake looks like the same pattern at any scale.
Sources
- Gartner: Weak AI Governance Will Lead to Business-Critical Service Disruptions for 40% of I&O Organizations by 2028 (November 16, 2026)
- Tian Pan: The Agent Undo Button Is a Saga, Not a Stack (April 27, 2026)
- Microsoft Learn: Compensating Transaction pattern
If you want more on giving agents autonomy without taking on needless risk, follow me on LinkedIn.
