Claude writes formal no-crash proofs for 123 open source libraries
Working with Theorem, Anthropic had Claude prove at the machine code level that 239 entry points in 123 open source libraries never crash on inputs under 64 megabytes. The proofs total about 180 million lines of Rocq, and the effort turned up hundreds of bugs that were fixed along the way.
Anthropic has shared the results of a project with its partner Theorem on its research page, published on October 22. Claude wrote formal proofs that 239 entry points across 123 open source libraries do not crash on any input smaller than 64 megabytes. Formal verification means proving mathematically that a program meets a stated condition in every case. Tests check the inputs someone tried, while a proof covers every possible input. The proofs were written at the level of the RISC-V machine code produced after compilation and checked by the Rocq proof checker. Together they come to about 180 million lines of Rocq, with a typical proof running to about 600,000 lines. Anthropic describes the work as the first large-scale effort to use AI to apply formal verification to production software at the assembly code level.
Fuzz tests turned into specifications
The starting point was OSS-Fuzz, Google's service that continuously runs open source libraries against randomly generated inputs to find bugs. Each library in the program already has entry points written for this, called fuzz tests. According to Anthropic, the team turned these existing entry points into specifications stating that the fuzz test will not crash on any input under 64 megabytes. Each library and its fuzz test were compiled for a RISC-V processor, then combined with Theorem's model of the RISC-V instruction set and of a Linux process to produce the statement to be proved. The proofs show that, across every modeled operating system response and memory layout, the program exits normally without memory safety errors or failed assertions. Claude wrote the proofs and Rocq checked them.
Hundreds of bugs along the way
Code that contains a crash bug cannot be proved crash-free, and Anthropic says the proof attempts turned up hundreds of bugs for that reason. Claude fixed the bugs it found, regenerated the specification and redid the proof. Anthropic says every patch was logged and audited so that Claude could not make a proof easier by changing code it should not touch. Examples on the page include an out-of-bounds write in a decompressor triggered by an input of about 20 megabytes with one rare memory layout, an image decoder bug that needed a 64 megabyte input and more than 2 gigabytes of memory, and a rediscovery of CVE-2026-56132 in libexpat. Claude also found logic bugs that never cause a crash; Anthropic mentions one in a critical application that had gone unnoticed for more than a decade. In a separate effort to verify a widely used PDF reader, Anthropic says it found as many security bugs in one week as are typically reported in a year.
What was released
A subset of the proofs is available on Theorem's GitHub so that anyone can check and reuse them. The release covers the complete proofs for fuzz tests that needed no patching, the specifications for tests that could not be proved, the RISC-V and Linux process models, and the trusted components that were not already public. A Claude skill that helps developers verify their own code is included in Theorem's OSS Verify repository. Proofs that could reveal a bug not yet patched in the open source code are being held back. Theorem is offering to run the same pipeline for other open source projects.
Cost and models
According to Anthropic, a single proof can take hundreds of millions of tokens to produce, and the OSS-Fuzz work took a few weeks. Formal verification has historically required years of expert effort, which kept it out of reach for most projects. In a test of 36 small tasks taken from OSS-Fuzz code, Claude Opus 5.5 proved half of them using about 40% fewer tokens than Opus 5. Letting agents share proofs in a common workspace cut the tokens needed by 17% compared with working alone.
Limits Anthropic lists
Anthropic stresses that being formally verified does not make software bug-free. A proof checker cannot tell whether the specification matches reality, so a proof is only as strong as the specification and machine model behind it. The proofs apply to single-threaded, statically linked RISC-V programs using musl libc, while most people run these libraries on x86 or ARM, dynamically linked against glibc. AddressSanitizer, used to turn memory errors into crashes, does not catch every memory safety bug. Not every entry point of each library was verified, and the proofs do not cover a calling program that misuses the library and corrupts memory. The trusted base includes the hardware, the operating system, the OCaml compiler, the Rocq checker and the RISC-V and Linux models. Anthropic adds that the work is still far from fixing all possible bugs.
The bug counts and token comparisons are Anthropic's own figures, while the released proofs can be rechecked by anyone with Rocq. For a fuller picture, follow reviews from independent researchers too.
Sources: Anthropic (research), GitHub (proofs), GitHub (Linux process model)