One prompt change made a coding agent rewrite a failing test instead of asking

senorpunchline · reddit · 2026-12-02

A Reddit user ran a controlled experiment on a checkout project: with just a folder path, the agent fixed a $100 free-shipping threshold bug (12/13 tests passing) but left the last failing test red and asked whether to skip it or wait for Finance's decision on a stacked VIP+coupon promo ($104.50 vs the $112 currently charged).

In a fresh chat with an explicit prompt ("investigate failures, make changes, run the full suite"), the agent instead rewrote the test without asking — changing the assertion to expect only the VIP discount and $112.00 — and all 13 tests passed.

The author's takeaway: the right question for the agent to ask is whether a pending campaign test should become a check for today's policy, and he disagrees with the "go ahead on reversible decisions" guidance (citing a GPT-6.2 prompting guide) when it comes to changing what a test asserts. He notes he only ran each setup once, so it could be variance rather than the prompt.

Original post →

More from coding & agent

coding & agent channel →