Anthropic claims AI can now verify code safety automatically
A new collaboration with Theorem suggests that formal proof generation by Claude could make software verification routine rather than an expensive specialist task.
By Isabella Morgan ·

For developers who rely on widely used open-source tools, the standard for confirming software safety may soon shift from manual review to automated mathematical proof. Anthropic has announced that its Claude model, in partnership with Theorem, successfully generated formal proofs for existing software libraries. This development marks a significant step in how code correctness is established, potentially altering the workflow for teams that depend on these foundational components.
The collaboration utilized Claude to mathematically verify existing code rather than generating new applications from scratch. The model processed test programs from 123 open-source libraries within Google's OSS-Fuzz security project. In a matter of weeks, the system produced approximately 180 million lines of proof code. According to the researchers, this process required minimal human intervention, a claim they describe as fully autonomous proof generation despite the fact that the underlying formal foundations were built by human engineers at Theorem.
Historically, formal verification has been a resource-intensive endeavor reserved for high-stakes environments such as avionics. A previous effort to verify the seL4 operating system kernel required 20 person-years of specialist work. By contrast, the AI-driven approach compresses this timeline drastically. The system translates crash tests into mathematical problems and analyzes compiled machine code to produce the necessary proofs. An independent verification program called Rocq then checks these proofs for validity.
The verification process also served as a bug-hunting mechanism. While generating proofs, Claude identified hundreds of bugs that conventional testing methods had previously missed. Many of these defects only manifest under specific conditions, such as unusually large input files or particular sequences of data access. In one instance involving a widely used PDF reader, the team discovered as many security vulnerabilities in a single week as are typically reported for that software in an entire year. In another case, the model detected a logical error that had remained undetected for over a decade.
Anthropic notes that the attempt to generate a proof often surfaces real bugs even when a complete proof is not ultimately achieved. This capability suggests that the cost of verification may decrease as AI systems become more efficient at identifying edge cases. However, the company acknowledges that formal verification is not a guarantee of error-free performance in all scenarios.
There are strict practical limits to the current system. The proofs hold only under specific conditions, including a particular processor architecture, single-threaded programs, and inputs smaller than 64 MB. In practice, these libraries often run on diverse hardware and in more complex configurations. Additionally, the computational cost is significant, with individual proofs consuming hundreds of millions of tokens. Anthropic did not disclose the total project costs, but the efficiency gains are becoming apparent as newer models solve problems with fewer tokens.
The broader implication for the software industry is a potential shift in how developers trust AI-generated code. If an AI system can both write code and prove its correctness under defined conditions, the review burden may decrease. Anthropic expects this method to become as routine as standard testing in the near future. Theorem’s roadmap already targets critical infrastructure components such as glibc, OpenSSL, and cURL, indicating a plan to expand the scope of automated verification beyond open-source libraries.
As the technology matures, the focus is moving from whether AI can program to whether it can guarantee the safety of that code. The project demonstrates that while the method is not yet universal, it offers a viable path toward more reliable software automation. For now, the system remains a powerful tool for specific types of verification, but its expansion into core system components could redefine industry standards for security and reliability.






