← sources

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

source: reddit (reddit:AI_Agents)published 2026-09-24 12:46ingested 2026-09-25 02:36

retained text

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:

1. A user approves one action.
2. The tool performs the action.
3. Its response is lost before the workflow records success.
4. 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.

document fetched 2026-09-25 00:19 · canonical https://reddit.com/r/AI_Agents/comments/1wp0p3s/approval_and_completion_are_different_states_a