Asked about Designing so failure is survivable
How do you make an agent safe to retry?
An answer that works
Idempotent tools keyed on run id and intent, so a repeated call returns the previous result instead of acting twice. Checkpoint after each turn so a resumed run continues rather than restarting, and remember that the message list is not the whole state when a tool changed the world.
Then they push further
The payment API does not support idempotency keys. What do you do?
Record intent before calling: write a pending record with a unique id and check for it before any retry. Resolve uncertain cases by asking the payment system what actually happened instead of calling again.
What gets marked up
Strong answers mention idempotency keys and checking state before retrying, and treat a timeout as an unknown outcome rather than a failure.
Reading an answer is not being able to give one. The section that teaches this is Designing so failure is survivable, 5 hours of Agent reliability.
Learn this properly