I’m not against tests. Tests are excellent: they make sure code does what it’s supposed to do. The problem is how AI agents write them.
Agents write code, then write a test tuned to that code’s output. When the code changes, they update the test to match. Developers write tests to lock in a working state, not to mirror every change.
Summary
- Developers write tests first, or after the product works, to freeze that working state.
- Agents fall into a loop of writing code, writing a test, updating the code, then updating the test, and lose sight of the product.
- My AGENTS.md now makes new test files opt-in: no new unit, integration, end-to-end or spec tests, helpers or fixtures by default.
- The trigger: while building the homepage for MailMeLater, an agent wrote a test only to check that a noise texture image returned a 200.
How to apply it
- Add an opt-in rule for new test files to your AGENTS.md so agents don’t create them unless you ask.
- Build the product first and confirm it works end to end.
- Then ask the agent for tests that lock in that state, and describe how you want them shaped.
- Reject tests that only confirm a static file exists or restate the implementation.
Get the next test the day it’s out.