Agent retries can double-charge users — idempotency keys are the fix

FallElectronic3774 · reddit · 2026-11-11

When an agent retries a failed tool call, it assumes the call never happened. That holds for a 500 that never reached the service but fails for a timeout after the work was done, and the model can't tell them apart from the error string. The fix isn't a better prompt — it's an idempotency key the tool honours, so retries return the first result instead of doing the work twice. Payment APIs have worked this way for years; agents are now the ones calling them.

Original post →

More from coding & agent

coding & agent channel →