Verify before retrying
Summary
When an agent crashes halfway through an action, the safe move is not to run it again. It is to find out what happened.
MELRArecovery_required
file.write notes.md
It may or may not have happened. Check the world first; never re-run blindly.
- Record saved before it runs
- Run started
- Verify no answer: the run was cut off
Distributed systems have a well-worn way of recovering from failure: replay the operation. If a write did not complete, write again. That works because the same request produces the same effect.
Language-model agents break that assumption. Give an agent the same state twice and it may not take the same action twice. Picture an agent that starts a payment, crashes before it records the confirmation, and restarts. On the second attempt it creates a new transaction identifier. Every step looks correct. The customer is charged twice.
This is not a failure of intelligence. A smarter model would make the same mistake, because the fact it needs is not in its context. It is in the world: in the payment provider, the database, the file system.
So the rule we work from is simple. An interrupted action has an unknown outcome until something checks. Before retrying, the system should inspect the outside world and settle what actually happened.
That leads to a richer picture of an action than success or failure. An action can be requested, authorised, started, executed, verified and reconciled. Some actions can be reversed. Some need a compensating action. Some can only be reconciled. A few cannot be undone at all, and those deserve stronger authorisation before they start, not after.
None of this is exotic. It is the careful engineering that payment systems and databases learned long ago. What changes with agents is that the part deciding what to do next is not deterministic, and it can be confidently wrong about the state of the world.
It is one of the ideas behind MELRA, our open execution layer. There, an interrupted change that cannot be confirmed from the world enters recovery_required, and MELRA does not repeat it automatically. An interrupted read may be retried.