Anthropic's Claude Unearths Hidden Bugs in Legacy Code With Automated Proofs
Claude generated 180 million lines of mathematical proof for 123 libraries, a task that previously took 20 person-years for similar systems.
By Luca Schmidt ·

Formal verification has historically been too expensive for most software projects, requiring specialized expertise and decades of labor for small systems. Anthropic has now used its Claude model to automate a large portion of that work for existing open-source code.
Working with partner Theorem, Anthropic’s Frontier Red Team directed Claude to verify 123 libraries from Google’s OSS-Fuzz security project. The model generated approximately 180 million lines of mathematical proof code in a matter of weeks. This process converts crash tests into mathematical problems and analyzes compiled machine code to ensure the software behaves as intended.
A separate program called Rocq checks the generated proofs automatically. Anthropic describes the proof generation as "fully autonomous," though it notes that humans at Theorem built the underlying formal foundations. The company states the process requires almost no human reviewers, a stark contrast to traditional methods.
The effort uncovered hundreds of bugs that conventional testing likely missed. These errors typically appear only under narrow conditions, such as unusually large input files or specific access sequences. During a week of verifying a widely used PDF reader, the team found as many security bugs as are usually reported for that software in a full year. In another instance, Claude identified a logical error that had remained unnoticed for over a decade.
Anthropic cautions that "formally verified" does not mean "error-free." The proofs apply only 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 and configurations, which may fall outside these bounds.
Cost remains a variable factor. Individual proofs consume hundreds of millions of tokens, and Anthropic has not disclosed the total project cost. However, a smaller test run showed that Opus 5.5 solves half the proofs using about 40 percent fewer tokens than Opus 5, indicating improving efficiency. The company argues that this approach could reduce the time developers spend reviewing AI-generated software.
The project targets critical infrastructure libraries including glibc, OpenSSL, and cURL. Anthropic expects this method to become as practical as standard testing, shifting the focus from code generation to code validation.






