Home · Writing

Earning Trust

Why TDD Is Not Enough

November 21, 2026 · First published on this site

Test-driven development is not enough in agentic development. The tests still get written first. The code still gets built to pass them. TDD does the job it always did, and the job was never the whole job. The gap it leaves, the assumptions it cannot catch, used to be covered by everything around it. In agentic development that gap is where the failures live.

To see why, it helps to be honest about what TDD was doing for human developers. The tests were never mainly a verification tool. A unit test suite checks a small fraction of what a system does, and everyone who practiced TDD knew it. The real product of writing the test first was the thinking it forced. Before touching the implementation, the developer had to decide what the behavior actually was: the inputs, the outputs, the boundary, the failure case. The test was a decision written down in executable form. Writing it first meant the decision came before the code, made by a person who had to understand the requirement well enough to pin it.

The discipline lived in that pause. The regression net was a side benefit.

The same mind writes both

An agent does not pause. Give a coding agent a requirement and ask for tests first, and it produces the tests from the same reading of the requirement it would have coded from. Then it produces the code from that same reading. When the reading is wrong, the test and the code are wrong together, in agreement, and the suite passes.

This is the failure TDD cannot catch, and in agentic development it is the most common failure there is: a misread requirement, faithfully implemented. Human teams caught some of these around the edges of TDD, in review, in QA, in a user saying this is not what I asked for. Those catches were other checks, independent ones, quietly compensating for the gap. An agentic pipeline removes several of them at the same time as it scales the gap up. A discount that should apply after tax gets applied before it. A limit meant per user gets enforced per session. The agent believed something specific about what was asked, wrote a test that encodes the belief, wrote code that satisfies the test, and reported success with evidence. The evidence is real. It just measures agreement with the assumption, and the assumption was the thing that needed checking.

In human TDD there were two minds in the loop, in a loose sense: the developer deciding what the behavior should be, and the developer implementing it, separated by the act of writing the decision down first. The separation was thin, and it still caught things, because writing a test is a different cognitive act from writing code and the mismatch between the two readings surfaced in the work. An agent collapses the separation. One reading produces both artifacts in one motion. There is no second reading for the first one to collide with.

The assumption gets promoted

Worse, the test does not leave the assumption where it found it. Once a test exists, the assumption inside it stops being an assumption. It becomes the specification the rest of the process defends. Reviewers check the code against the tests. The agent checks its own changes against the tests. A human skimming the work sees a green suite and moves on. The one artifact that was supposed to challenge the implementation has been built from the implementation's own beliefs, so the challenge never happens. The assumption rides through the entire pipeline untouched, and it arrives at the end with a green checkmark as its character reference.

Scale makes this worse, and agentic development is all scale. An agent can generate hundreds of tests in minutes, and nobody reads them either. The suite becomes a second vibe-coded artifact: voluminous, plausible, and unexamined. Coverage numbers climb. The number that matters, how many of these tests encode a verified understanding of the requirement, stays unknown, because verifying it would require the independent check the process was supposed to provide.

What still works, and what has to replace it

Unit tests keep one honest job in an agentic workflow: regression. Once behavior has been verified by some independent means, tests pin it, and a later change that breaks the pin gets caught. That is characterization, and it is valuable. What the tests cannot do is supply the original verification. A pin holds a position. It does not tell you the position was right.

So the verification has to come from outside the author's assumptions. That means testers who never shared the reading the code was built from: a tester holding the requirements and meeting the app the way a user does, a tester hunting edge cases by interrogating the system about its seams, a tester trying to misuse it on purpose. I work through that design in a companion piece, “The Testing Is the Factory.” The short version is that in agentic development, independence is the property that makes a test worth anything, and TDD, for all its virtues, has no independence in it. It is a good practice working one layer down from where the failures now happen. Necessary, and not enough. The author of the test and the author of the code are the same author, working from the same assumption, at the same moment.

The test

Open your agent's latest change and read its tests the way a skeptic would. For each test, ask where its expectation came from. If the answer, every time, is the same prompt and the same reading that produced the code, then nothing in that suite could ever have disagreed with the code, and the green checkmarks are measuring agreement.

Agreement is cheap. In agentic development it is nearly free, and it is worth about what it costs. Where in your workflow does a belief about the requirement get challenged by someone, or something, that never held it?

This essay is the first of a pair. The companion piece, “The Testing Is the Factory,” works through the independent testing design this essay points to: black-box, white-box by interrogation, and red-team lanes. Browse the full archive on the home page.