Approval and completion are different states: a small agent retry test

Reddit r/AI_Agents News

Summary

The article explores the distinction between approval and completion states in agent workflows through a simulation test, highlighting the importance of idempotency and proper handling of retries to avoid duplicate actions.

A person clicking approve tells you the action is allowed. It doesn't tell you whether the external system completed it. Here's a small failure case to test: A user approves one action. The tool performs the action. Its response is lost before the workflow records success. The workflow retries. I ran a sequential, in-memory simulation with two attempts. Giving each attempt a new request key produced two simulated charges. Reusing one key for the same operation, with deduplication at the simulated recipient, produced one. The important part is where deduplication happens. Saving "done" in the agent after the tool returns still leaves a gap between the external action and that checkpoint. An in-memory dictionary doesn't solve crashes or concurrent workers either. For a real integration, I'd test the recipient's idempotency guarantees and how long it retains keys. Bind each key to the intended operation and payload; reject a changed payload rather than silently treating it as the old request. If the recipient offers neither deduplication nor an authoritative way to reconcile the result, mark it unknown and require investigation rather than blindly retrying. The approval screen should distinguish "approved", "confirmed completed" and "outcome unknown". Otherwise a green approval check can look like proof that the job finished. Disclosure: I build Pushary, which works on agent approvals. This example is a standalone simulation, not a test of Pushary's production recovery behavior.
Original Article

Similar Articles

Your agent's retry logic dies when the agent does

Reddit r/AI_Agents

The author shares lessons from putting an AI agent with write access into production, explaining that retry logic inside the agent loop fails when the process dies. They advocate for treating side-effectful tool calls as durable background jobs with idempotency keys.