Prompt rules don't stop double payments: agent testing shows code and ledgers must enforce spend

Tiny_Associate_8254 · reddit · 2026-10-26

A developer building EmberTail, a test harness for money-moving agents, argues that spending controls like "never pay twice" don't belong in system prompts. In tests, an autonomous agent with a prompt-level no-double-payment rule still made three duplicate payments, all with the same pattern: the payment settled but the reply timed out or errored, and the model—unable to distinguish "call failed" from "call succeeded but reply lost"—reasonably paid again. The fix was boring: move the rule into code, holding any payment with an unknown outcome until a human checks. Zero doubles after that. His rule of thumb: the prompt decides whether the agent wants to pay, code decides whether it's allowed, and the ledger decides whether it happened. Even his well-behaved example agent still fails 11 of 63 test cases, underscoring how hard this is.

Related event: Testing 30 payment-enabled agents: 5 money-loss bugs where failure looks like success(2 posts)→

Original post →

More from coding & agent

coding & agent channel →