Nov 26, 2026 DISPATCH // HARDWARE, CODE & PLATFORMS

Claude Helps Formally Verify 123 Open-Source Libraries

Anthropic and Theorem used Claude to build machine-checked proofs for open-source software, including edge cases missed by random testing. The results show both the promise of automated verification and the steep cost of applying it widely.
Claude Helps Formally Verify 123 Open-Source Libraries Nerds Magazine © nerdsmagazine.com
Claude Helps Formally Verify 123 Open-Source Libraries © nerdsmagazine.com

A decompression tool's counter can underflow when it receives an unusual input of about 20 MB. Claude exposed the bug while trying to prove the program correct, one example of how formal verification can uncover failures that routine testing may miss.

Anthropic and research organization Theorem used Claude to formally verify 123 open-source libraries selected from Google's OSS-Fuzz environment, targeting 239 fuzz-test entry points. The effort produced roughly 1 billion lines of proof, with about 180 million passing checks by Rocq, a proof assistant whose kernel checks whether proof terms follow the formal system's logical rules. Claude also fixed hundreds of bugs uncovered during the work. Anthropic published its account of the collaboration on October 22, 2026, describing the effort as a large-scale application of formal verification to compiled software.

The results come with a major qualification: the proofs apply only within carefully defined conditions, and producing them remains expensive. For the covered entry points, Anthropic reported proofs of crash-freedom for inputs up to 64 MB; this is a property established under the project's models and assumptions, not a claim that every library is bug-free in every deployment.

What the proofs establish

Formal verification expresses software behavior as a mathematical model, then uses logic to establish whether the program meets defined requirements. The method is longstanding, but constructing proofs has traditionally demanded extensive manual work. For the seL4 microkernel, writing the code reportedly took two person-years; formal verification took 20.

Theorem modeled RISC-V machine instructions and Linux processes. Claude then generated proofs against those models, targeting the instructions that run on a CPU after compilation rather than the original source code. The effort established crash-freedom properties for 239 entry points across the 123 libraries. The reported single-threaded programs used static linking, and memory use had to remain fixed.

Those boundaries matter. The results do not establish that a program is free of bugs in every configuration or on every processor. A proof for RISC-V does not rule out defects on Arm or x86, and modeling real operating environments would require accounting for each machine configuration where the software might run. The guarantees concern the specified crash property and modeled Linux-process conditions; different threading, linking, memory, or operating-system configurations fall outside that scope.

Claude's proof output reached about 1 billion lines. More than half was reportedly generated automatically by tools Claude created. Rocq verified about 180 million lines, checking whether the proofs followed logical rules. Anthropic said the proof artifacts totaled about 180 million lines of Rocq; a typical proof was about 600,000 lines for a binary with a median size of roughly 18,000 RISC-V instructions. These are checked proof artifacts, not a count of inputs run through ordinary tests. Humans still have to judge whether the underlying models and formalized requirements accurately capture the security properties needed in real-world use. Anthropic described the project in its formal verification account.

Cost and coverage remain hurdles

One verification can consume more than 100 million tokens. Anthropic says token requirements fall as models improve: across 36 small verification tasks, Claude Opus 5.5 used about 40% fewer tokens than Claude Opus 5 to complete half of them.

Theorem estimates that verification speed doubled roughly every two months across seven leading models released from May through September 2026. Sharing work areas among agents cut token use by 17% for the same task. Projects using common base libraries can also reuse proofs.

The potential savings depend on that reuse. In the Nix environment, a shared base library of 9 MB accounts for dependencies in two-thirds of all machine code. OpenSSL appears in the runtime dependencies of about 16,000 packages. Verifying it once at current prices would cost about $220,000, or roughly ¥35 million; spread across downstream packages, the estimate falls to about $14, or ¥2,200, per package.

Theorem estimates that if verification capability continues doubling every two months and the work receives an annual budget of $100 million, about 95% of Nix environment machine code could be covered by the end of 2027. The projected total cost is about $134 million, or roughly ¥21 billion.

Testing still leaves gaps

Random testing can miss bugs because it exercises selected inputs rather than proving behavior across all inputs covered by a model. OSS-Fuzz, launched by Google in 2016, has run more than 1 trillion cumulative fuzz tests, but it does not explore every possible path. Input sizes, for example, are capped at around 1 MB.

In a comparison reported by the research team, they deliberately planted seven bugs in a Python interpreter written in Rust by Claude. Random testing missed five; the proof found all seven.

Claude also modeled the x86 instruction set and reportedly uncovered hundreds of errors in its official reference documentation, along with a small number of defects in CPU hardware. In cpp-httplib, a C++ HTTP library, it examined the standard library's red-black tree implementation to prove at machine-code level that tree height remains logarithmic, addressing the risk of stack exhaustion from deep recursion.

Theorem is offering its method free to open-source projects and has published the skills used for verification. Proofs for the first 25 libraries and 60 verification entry points are available on GitHub for anyone to download and check.

Aengus Lynch, a Theorem researcher, said, "It's a terrifying time for the internet, but I believe this is a ray of hope," and said he believes all critical software could one day be formally verified.

Topics:
Artificial Intelligence Software Development Developer Tools #Open Source Software #Claude #Large Language Models #GitHub
Ethan Cole Editor Nerds Magazine
Editor

Ethan Cole

Ethan Cole is an Editor at NerdsMagazine covering software, Windows, gaming, PC hardware, and practical troubleshooting. He focuses on clear explanations, dependable fixes, and helping readers understand when a problem can be solved without unnecessary upgrades or replacement.