Anthropic’s Frontier Red Team, in collaboration with partner Theorem, has utilized Claude to perform formal verification on existing software, marking a significant shift in how AI can ensure code correctness. The project demonstrated that large language models can autonomously generate mathematical proofs to validate software, a process traditionally reserved for critical systems due to its high cost and complexity.

What Happened

The initiative involved Claude verifying code from 123 open-source libraries within Google's OSS-Fuzz security project. According to the report, the model produced approximately 180 million lines of mathematical proof code over a period of a few weeks. Unlike traditional methods that require specialized teams, the researchers describe this as "fully autonomous" proof generation, although they note that the underlying tools and formal foundations were built by humans at Theorem. The proofs are automatically checked by an independent verification program called Rocq, which Anthropic states requires almost no human review.

During the verification process, Claude encountered hundreds of bugs and was permitted to fix them itself. The report highlights that many of these issues would have evaded conventional testing because they only manifest under specific conditions, such as unusually large input files or particular access sequences. In one instance involving a widely used PDF reader, the team discovered as many security bugs in one week as are typically reported for that software in an entire year. In another application, Claude identified a logical error that had remained undetected for over a decade.

Why It Matters

Formal verification has historically been prohibitively expensive, requiring up to 20 person-years for a small operating system kernel like seL4. This method was previously limited to extreme cases such as Airbus avionics. By automating the proof generation, Anthropic suggests a path toward making software automation more trustworthy. If AI can not only write code but also prove its correctness under defined conditions, developers could rely less on manual review, potentially reducing costs across the entire coding process.

However, the report emphasizes strict practical limits. "Formally verified" does not equate to "error-free" in all contexts. The proofs hold only under specific constraints: a particular processor architecture, single-threaded execution, and inputs under 64 MB. Additionally, the compute cost is significant, with individual proofs consuming hundreds of millions of tokens. Anthropic did not disclose the total project costs. Despite these constraints, the project indicates improving efficiency; a smaller test run showed that newer models like Opus 5.5 solved half the proofs with about 40 percent fewer tokens than the previous Opus 5 model.

The long-term implications extend beyond current coding tools. Anthropic expects that AI-driven formal verification will soon become as practical as standard testing. Theorem’s roadmap already targets critical infrastructure components such as glibc, OpenSSL, and cURL, suggesting a move toward verifying the foundational software layers that support the broader digital ecosystem.

The Bottom Line

Anthropic and Theorem have demonstrated that Claude can autonomously generate extensive mathematical proofs to verify open-source software, uncovering latent bugs missed by traditional testing. While the approach offers a promising avenue for increasing trust in AI-generated code, it remains bound by specific technical constraints and high computational costs. The project signals a potential future where formal verification becomes a standard part of the software development lifecycle.