AI model writes 180 million lines to check old code
Anthropic's Claude verified 123 open-source libraries in weeks, finding bugs that human testing missed.
By Larissa Shah ·

Software verification usually takes decades of human labor, but Anthropic says its AI model cut that timeline to weeks. The company used Claude to mathematically prove that existing code runs correctly without errors. This work targets a long-standing gap in how developers trust automated coding tools.
Formal verification has historically been too expensive for most projects. Specialists required 20 person-years to verify seL4, a small operating system kernel. Because of that cost, the technique was mostly reserved for critical systems like Airbus avionics. Anthropic partnered with Theorem to hand this work to Claude instead. The model generated about 180 million lines of proof code in a matter of weeks. It used test programs from 123 open-source libraries in Google's OSS-Fuzz project.
Claude did not write new software. It analyzed compiled machine code and turned crash tests into mathematical problems. A separate program called Rocq checks the proofs automatically. The researchers describe the process as fully autonomous, though humans built the underlying tools at Theorem. The model needed almost no human reviewers to complete the task.
The project uncovered hundreds of bugs, many of which Claude fixed. Researchers say these errors often hide in narrow conditions, such as unusually large input files or specific access sequences. Conventional testing might have missed them. In one test on a widely used PDF reader, the team found as many security bugs in one week as are usually reported in a full year. Claude also identified a logical error that had gone unnoticed for more than decade. Anthropic notes that even failed proof attempts can reveal real bugs.
The company warns that formal verification does not mean the software is error-free. Proofs only hold under specific conditions, including a particular processor architecture, single-threaded programs, and inputs smaller than 64 MB. Real-world deployments often run on different hardware. Cost remains a constraint, as individual proofs consume hundreds of millions of tokens. Anthropic has not published total project costs. However, a smaller test run showed that Opus 5.5 solves half the proofs using about 40 percent fewer tokens than Opus 5.
Anthropic argues that if AI can verify its own code, developers can trust AI-generated software more and spend less time reviewing it. The company expects formal verification to become as practical as standard testing. Theorem's roadmap already targets critical infrastructure, including glibc, OpenSSL, and cURL. The next step is to apply this method to the foundational libraries used by modern applications.





