Are unit tests still important when AI agents write the code? A month-long audit of DocSpring's CI history and Claude Code transcripts from September 30 to October 29 found that every identifiable Jest failure in CI came from the tests themselves, not from product bugs, while two failing tests did prompt an agent to fix its code — one of which would have broken a rule in DocSpring's e-signing feature. The audit also found a single snapshot test file for the PageImage component that agents updated 24 times in six weeks without catching anything; the file is 167 lines long, 125 of which are template settings even though the component reads only the page dimensions. The author argues the unit-versus-end-to-end distinction did not predict usefulness — the source of a test's expected value did, with tests checking a rule someone had decided proving useful and snapshot tests comparing output to an earlier copy of itself proving costly, a distinction echoed by Kun Chen's follow-up that an agent-written test with no specified requirement just describes what the code does. Some developers are taking unit tests out of CI now that agents write their code, and a few are deleting their test suites. Their argument is that agents spend time and tokens writing and repairing tests that mostly repeat the implementation, and the software ends up no better. Thorsten Ball asked https://x.com/thorstenball/status/2115718591169585456?ref=docspring.com : "When's the last time you've seen an agent build something and then go 'ohh no, lots of tests are telling me this is wrong, let me fix that'?" Agents write DocSpring's code now https://docspring.com/blog/posts/operating-a-saas-when-ai-agents-write-all-the-code/ , so I had enough info to do some research. I asked an agent to go through a month of our CI history and Claude Code transcripts, from September 30 to October 29, and to trace individual failures through the commits that followed. It does happen: I can show two failing tests that made an agent fix its code, and one of those bugs would have broken a rule in our e-signing feature. I can also show a test file that agents updated 24 times in six weeks without it catching anything. Whether a test was a unit test or an end-to-end test didn't tell me which group it would land in. The source of its expected value did. The useful tests checked a rule that someone had decided, while the costly ones were mostly snapshot tests that compared the code's output with a copy of its output from an earlier day. The argument against tests There are a few different proposals. Arthur Katcher is dropping unit tests from CI and keeping end-to-end tests and evals https://x.com/arthurkatcher/status/2115832759159517368?ref=docspring.com . Aravind Putrevu described deleting his test suites https://x.com/aravindputrevu/status/2115168983598928209?ref=docspring.com . Kun Chen brought an experiment. On the DeepSWE evaluation set, he reported that stopping Sonnet 5.5 High from writing tests cut time and token use, without a statistically significant drop in success. A smaller experiment also stopped the agent running the existing tests, and he saw no change in the success rate. His original post https://substack.com/@kunchenguid/note/c-355619717?ref=docspring.com left the value of end-to-end tests open. His follow-up https://substack.com/@kunchenguid/note/c-356087116?ref=docspring.com adds an important distinction. A test that an agent writes by default, with nobody telling it what the software should do, describes what the code does. If the agent misunderstood the requirement, the code and the test are wrong in the same way, so a passing test is meaningless. Our month has an example on each side of that distinction. A snapshot that changed 24 times and caught nothing Every Jest failure we could identify in CI that month came from the tests themselves: an expectation that an intended change had made stale, or a test environment that was missing something. None of them was a bug in the product. The clearest example is a snapshot test for the component that shows a page's image in our forms. The test renders the component and compares the result with a saved file. The component takes the whole template as a prop, so the saved file includes every setting a template has: // PageImage.test.tsx.snap excerpt