Agents don’t fail in production because of the model. They fail when one timeout turns into two refunds. Here is how to make sure every agent action is idempotent, secure, and deterministic.
One timeout, two refunds. I've had that one. The fix that held was a key made from the input, checked before anything is sent, so a retry finds the first attempt and stops. Mine lives in the system being called, not in the agent.
IN_DOUBT is the state that needs an owner and a clock, not just a resolution path: left alone, it waits for end-of-day reconciliation while the customer has already been told the refund is being processed. An intent stuck there past a set threshold should page a human and reopen the conversation with the customer, because silence after a pending promise is its own failure.
One timeout, two refunds. I've had that one. The fix that held was a key made from the input, checked before anything is sent, so a retry finds the first attempt and stops. Mine lives in the system being called, not in the agent.
The model deciding to retry is the part nobody plans for.
My own logs had 84 browser timeouts in 14 days. The rule I wrote after: never retry navigate after a timeout, look at the page first.
IN_DOUBT is the state that needs an owner and a clock, not just a resolution path: left alone, it waits for end-of-day reconciliation while the customer has already been told the refund is being processed. An intent stuck there past a set threshold should page a human and reopen the conversation with the customer, because silence after a pending promise is its own failure.