How well do agents use test/verification techniques?
Summary
Dan Luu ran a controlled experiment testing 26 different testing/verification conditions (TDD, formal methods, fuzzing, property-based testing, popular skills, etc.) on coding agents implementing Zstd in Rust, finding that agents almost universally fail to apply any technique meaningfully. Regardless of the instruction given—whether Lean 4, QuickCheck, Verus, or TDD—agents default to naive unit tests inside the framework's scaffolding without extracting the technique's actual value. The cruelly ironic result is that the Default condition (no testing instructions at all) scores above average, because telling agents to do useless things is worse than telling them nothing. Agents can identify risky code areas when asked, but then systematically fail to write tests that cover those areas.
Key Insight
Instructing agents to use specific testing techniques or verification libraries is largely counterproductive—agents fail to apply them meaningfully and produce worse outcomes than with no instructions at all, revealing a fundamental gap in how AI labs have trained agents that only RL environments targeting effective testing behavior can fix.
Spicy Quotes (click to share)
- 9
AI agents' approach to testing, more or less: Take the pathological cases dreamed up by someone objecting to mocks 15 years ago, without ever having actually used mocks. Naive dreams of excessive mocking. Make those pathologies the backbone of your testing strategy.
- 7
It stands to reason that not telling agents to do things that will make them do useless work does better than telling them to do things that will make them do useless work.
- 6
Agents tend to either just write the tests they would normally write, but inside a framework for a different type of test technique, or they'll use a technique superficially but not really do the things that get the value out of the technique.
- 6
I'm curious why AI labs haven't created RL envs to get agents to learn how to test well since software not working reasonably seems important for coding agent adoption and it also seems like the kind of thing that's amenable to RL.
- 6
The skills seemed written like they're human tutorial instructions... My naive thought as someone who's written all of one skill is, I'd guess that this isn't optimal when working with a model that should already have some knowledge of the topic—the model is already going to have some kind of default behavior distribution, so the more natural thing to do is to give statements that will modify that behavior.
Tone
analytical
