Agent tests stayed green while it refunded a customer twice

tom_mathews · reddit · 2026-11-15

The author built a synthetic support agent (order lookup, refunds, emails) to stress-test agent testing itself, planting a classic payment failure: the API commits the refund, then times out. The agent retries without an idempotency key, refunding the customer twice — while replying politely and correctly ("Your refund of $84.00 has been processed").

Key insight: every test passed because they all asserted on the reply; the bug lived in tool calls and the payments ledger.

What finally caught it:

The author, who maintains an open-source framework around this approach, asks how others assert on side effects, handle retries/idempotency, and keep CI deterministic and cheap.

Original post →

More from coding & agent

coding & agent channel →