Refund agent passed all 20 refund tests but leaked other customers' orders in 3 of 3 runs
QuietPenguinStephen · reddit · 2026-12-04
A developer shares pre-handover testing lessons for a small refund agent (Mastra + Claude Haiku 4.5, four tools, simulated shop), checking tool calls, state changes, and customer-facing replies separately:
- All 20 completed runs produced correct refunds, including a timeout-after-success edge case where the agent queried status instead of retrying.
- Yet in 3 of 3 runs, when a customer asked about someone else's order, the agent looked it up and disclosed the owner. Initial checks passed because they tested what the agent changed, not what it was allowed to read — authorization is a separate failure surface.
- Other surprises: failed tool calls don't appear in run tool results unless you log them yourself, and two AI judges disagreed on whether the same reply was accurate.
He asks how others run acceptance testing against client business requirements before handover.
More from coding & agent
- Neon drives more skill creation in a week than any model in two years — dreamwieber · 2026-12-04
- Rex terminal hits general availability, pitched as a multiplexer for humans and agents — MxMnr · 2026-12-04
- 19 Search APIs Benchmarked: Parallel Fast Cheapest at 0.2¢ per Correct Answer — edwin · 2026-12-04
- Claude Code cites Keirolabs most but never recommends it: cited isn't recommended — edwin · 2026-12-04
- Cost prompts push agents to Brave, docs prompts to Exa, Tavily wins by default — edwin · 2026-12-04
- A bare 'pick one' prompt makes every coding agent choose Tavily — edwin · 2026-12-04