How to Answer
“The first three steps already happened — that’s the entire problem. An agent that takes real actions is a distributed transaction with a language model as the coordinator, and there is no rollback for ‘the money moved’.
So I design for it three ways. Every write tool takes an idempotency key, so a retry after a timeout can’t charge anyone twice. Every step’s result is checkpointed, so a resume starts at step 4 instead of replaying step 1. And every irreversible step has a compensating action written before it ships — refund for charge, cancellation for booking — because undo has to be something you built, not something you hope for.
Then I order the workflow so the irreversible steps land last wherever I can. If steps one to three are reads and step four sends the email, a failure at four costs nothing at all.”