Anthropic's Claude now writes code and proves it safe automatically

Anthropic's Frontier Red Team, working with partner Theorem, used Claude to formally verify existing open-source software, generating about 180 million lines of mathematical proof code across 123 libraries in just a few weeks. The libraries came from Google's OSS-Fuzz security project. Rather than writing new software, the model translated crash tests into mathematical problems, analyzed the compiled machine code and produced proofs that an independent checker called Rocq validates automatically. The researchers describe the process as "fully autonomous" proof generation, though they credit humans at Theorem with building the tools and formal foundations.
Formal verification means proving that code behaves correctly under every input the proof covers, not just the cases a test suite happens to exercise. It has historically been too expensive for most software: the source notes a team of specialists needed 20 person-years to formally verify seL4, a small operating system kernel, which is why the technique has been confined to high-stakes systems such as Airbus avionics. Anthropic's bet is that a language model can do the proof-writing grunt work cheaply enough to make the method routine.
The bug-finding results are the most concrete outcome. While constructing proofs, Claude encountered hundreds of bugs and was permitted to fix them itself, according to Anthropic. Many would have evaded ordinary testing because they surface only under narrow conditions, such as unusually large input files or a particular sequence of memory accesses. In one case, while verifying a widely used PDF reader, the team found as many security bugs in a single week as are typically reported against that software in a year. In another application, Claude caught a logical error that had gone unnoticed for more than a decade. Anthropic says a failed proof attempt still tends to surface real bugs, which makes the approach useful even when it does not fully succeed.
The scope is narrower than "verified" might suggest. Anthropic acknowledges the proofs hold only under strict conditions: a specific processor architecture, single-threaded execution and inputs below 64 MB. Real deployments run these libraries on different hardware and in different configurations, so a proof is a guarantee about a modeled program, not a blanket promise of error-free behavior. Compute costs are steep as well, with individual proofs consuming up to hundreds of millions of tokens; Anthropic does not disclose the total project cost. That combination of narrow assumptions and high token spend is the main thing standing between this and everyday use.
There are signs of improving economics. A smaller test run indicated that generated proofs are reusable, and Anthropic reports that a newer model, Opus 5.5, solves half the proofs with roughly 40 percent fewer tokens than Opus 5. If that trend holds, the cost per proof should fall quickly as models improve, which matters because verification cost is what kept formal methods out of mainstream engineering for decades.
Theorem's roadmap points at critical infrastructure next, naming glibc, OpenSSL and cURL as targets. Those are precisely the components where a subtle memory-safety or logic bug can affect enormous numbers of systems, and where manual proofs have long been considered impractical.
My reading is that the reusability finding deserves as much attention as the bug count. Formal proofs compose: once a library's behavior is established against a specification, downstream code can build on that guarantee instead of re-deriving it. If proof artifacts can be cached, shared and re-checked cheaply, verification could become a one-time cost per library version rather than a per-project expense, similar to how a well-maintained test suite is amortized across a codebase. The 64 MB input ceiling and single-threaded assumption suggest, though, that the modeling step is where human judgment will still be needed: choosing the right specification and abstraction is the hard part of formal methods, and it is not clear how much of that Claude is doing versus inheriting from Theorem's setup.
The pairing also addresses a growing worry about AI-written code. If a model can both produce software and generate a machine-checked argument for its correctness, review effort shifts from line-by-line inspection toward validating specifications and proof assumptions. That is a meaningfully different workflow from today's AI coding assistants, which speed up writing but leave confidence to tests and human review.
Why it matters: Teams maintaining widely used open-source libraries, and the companies that depend on them, are the first audience, since the 123 OSS-Fuzz targets and the named glibc, OpenSSL and cURL roadmap items sit directly in the dependency chains of most production software. For developers, the near-term change is likely a new kind of CI step in which a model drafts proofs and a checker validates them, flagging bugs that fuzzing misses, though the stated architecture, threading and 64 MB limits mean coverage will be partial at first (my inference). Product teams should read "formally verified" claims carefully until the assumptions behind each proof are published alongside it.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Anthropic had Claude generate mathematical proofs that existing code is correct, producing roughly 180 million lines of proof code for 123 open-source libraries. Along the way, the model caught bugs that years of testing had missed. Anthropic's goal: making formal verification with AI as routine as standard testing. The article Anthropic's Claude now writes code and proves it safe automatically appeared first on The Decoder .