
Proving that a program will never crash has so far been almost impossible; at best, you can test it with samples. Anthropic and its partner Theorem have now shown how that could change: over a few weeks, Claude wrote machine-checked proofs for test programs from 123 widely used open-source libraries, roughly 180 million lines in all. Along the way, the model uncovered hundreds of bugs, many of them the kind that conventional testing would hardly ever catch.
Key takeaways
- For 239 fuzz-test entry points across 123 libraries in Google’s OSS-Fuzz project, Claude proved that the programs run without memory-safety errors on any input under 64 megabytes.
- The proofs work at the level of compiled RISC-V machine code, and an independent proof checker called Rocq verifies every step.
- The proof attempts surfaced hundreds of bugs, including a logic bug that had gone undetected for more than a decade.
- The guarantee is narrow: RISC-V only, single-threaded only, statically linked programs only, while most computers run on x86 or ARM.
- Cost is the biggest hurdle: individual proofs consume hundreds of millions of tokens, though newer models cut that effort noticeably.
From testing to proof
Today, software is mostly tested. One especially thorough approach is fuzzing: a program is automatically bombarded with millions of randomly mutated inputs until it crashes, or doesn’t. Google’s OSS-Fuzz project has been doing this around the clock for key open-source libraries for years. But even trillions of test runs only show that the tested cases work. A bug that appears only with a rare memory layout or an unusual sequence of inputs can still survive for years.
Formal verification works the other way around. Instead of running through examples, it proves mathematically that a property holds for every possible input. The method is old and considered the gold standard, but it has been so laborious that it was used only on a handful of flagship projects. Anthropic cites the seL4 operating system kernel: building it took about two person-years, formally verifying it about 20. Otherwise, only safety-critical code, such as Airbus avionics software, gets checked at that expense.
How Claude went about it
The key idea of the study, which Anthropic’s Frontier Red Team published on October 22, is to use developers’ existing fuzz tests as a template. Each test was translated into a mathematical statement about the fully compiled program, instruction by instruction, at the level of RISC-V machine code. The foundation is a set of formal models from Theorem that describe how a RISC-V processor and a Linux process behave. In essence, the statement says: for any input under 64 megabytes, the program exits normally, with no illegal memory access and no failed assertion, for every modeled operating system response and every memory layout.
Claude wrote the proofs, and the Rocq proof checker verified them. That division of labor is the heart of the matter: Rocq is a small program, battle-tested over decades, that mechanically rechecks every proof step. Whether a proof holds therefore doesn’t depend on trusting the language model. According to Anthropic, a typical proof runs about 600,000 lines, for programs with a median of roughly 18,000 machine instructions. To keep Claude from simply patching bugs away to make its job easier, fixes were penalized, logged and audited. One side finding shows how closely the method looks: just building the RISC-V models exposed hundreds of mistakes in the official reference documentation.
What turned up
A proof fails wherever the program can actually crash, so every failed proof attempt points to a real bug. Anthropic reports hundreds of such findings, which Claude was then allowed to fix. The examples show why fuzzing had missed them: in a decompressor, a counter underflow caused an out-of-bounds write on inputs of about 20 megabytes combined with a rare memory layout. In an image decoder, an out-of-bounds read only occurred with a 64-megabyte file and more than two gigabytes of memory. In the XML library libexpat, Claude rediscovered the already known vulnerability CVE-2026-56132, which is triggered only by deeply nested input.
Two side projects are even more striking. In a widely used PDF reader that Anthropic does not name, the verification attempts found as many security bugs in one week as are typically reported in a year. In another critical application, Claude came across a logic bug that had gone unnoticed for more than a decade. That fits a trend that has been building for weeks: as the critical PHP2Shell vulnerability showed, AI models now find security holes faster than many projects can fix them. Anthropic had already offered maintainers a free AI security scanner for open source. The proof-based approach goes one step further: it doesn’t just hunt for bugs, it ultimately demonstrates their absence.
The limits of the guarantee
Impressive as the numbers are, the guarantee is narrow, and Anthropic says so plainly: formally verified does not mean bug-free. What was proven is the behavior of statically linked, single-threaded programs on RISC-V, linked against the lightweight C library musl. Most servers and laptops, by contrast, run on x86 or ARM and use the dynamically linked glibc. Whether a bug shows up on those platforms is outside the scope of the proof.
On top of that, some components have to be trusted without being proven themselves: the RISC-V and Linux models, the exact wording of the statements and the proof checker itself. If a model diverges from reality, a bug can hide there. In addition, AddressSanitizer, the tool the statements rely on, does not catch every memory error; not every entry point of a library was verified; and code that calls a library incorrectly can still corrupt memory. Only part of the work is public so far: Theorem’s GitHub repository contains proofs for 60 entry points in 25 libraries, including OpenSSL, zstd and bzip2, under the MIT license. Anthropic is withholding proofs that could point to bugs that have not yet been fixed.
What it costs and what comes next
The real bottleneck is compute. Individual proofs can consume hundreds of millions of tokens, and Anthropic does not disclose total costs. The effort is falling fast, though: in a smaller comparison of 36 tasks drawn from OSS-Fuzz code, Claude Opus 5.5 needed about 40 percent fewer tokens than Opus 5 to prove half of them. Agents that shared finished proofs with each other used 17 percent fewer tokens. And a proof for shared code only has to be done once.
That is exactly what Theorem’s plan builds on. The team wants to verify the software in the Nix package ecosystem at the binary level, starting with the libraries almost everything depends on, such as glibc and OpenSSL. At current rates, Theorem puts the cost for OpenSSL at about $220,000. With $100 million a year, it says, about 95 percent of the machine code could be verified by the end of 2027. That math assumes, however, that the models’ proving capability keeps doubling roughly every two months, as Theorem measured between May and September. That is an assumption, not a certainty.
The most important takeaway, then, lies less in the 180 million lines than in their reusability. Once proofs exist for building blocks like OpenSSL, thousands of packages benefit, nearly 16,000 in the case of OpenSSL, according to Theorem, much as mathematicians today build on the shared proof library Mathlib. Maintainers already have a concrete starting point: Theorem provides the models and a Claude skill for adding their own projects. The gap between a proven RISC-V program and an x86 server in a data center is still wide. But for the first time, the gold standard of software security is no longer a matter of person-years, but of compute budget.

