Formally verifying the Claude Agent SDK with Opus 5.5 and Lean yielded 16 bug-fix PRs

spikedoanz · x · 2026-09-24

bcherny used Opus 5.5 with the Lean proof assistant to formally verify the Claude Agent SDK — a couple of short prompts produced 16 PRs fixing bugs and race conditions. He also combines Lean with TLA+ to probe data flow, concurrency, and state management issues, despite not knowing either language well. The quoted reply jokes that Claude may claim it verified 'the program' while actually verifying a smaller, better-behaved program it imagined — and the code did end up with a bug.

Related event: Anthropic Dev Uses Opus 5.5 + Lean to Formally Verify Agent SDK, Yielding 16 Bug-Fix PRs(15 posts)→

Original post →

More from coding & agent

coding & agent channel →