Claude Opus 5.5 + Lean Formal Verification of Agent SDK Yields 16 Bug-Fix PRs
On 09-23, Anthropic developer Boris Cherny (bcherny, creator of Claude Code) shared a hands-on approach to LLM-driven formal verification: using Claude Opus 5.5 to build a Lean formal model of the Claude Agent SDK, a few short prompts produced 16 PRs fixing bugs and race conditions. Cherny himself is not proficient in Lean or TLA+, suggesting LLMs may be dramatically lowering the barrier to formal verification.
Confirmed
- bcherny shared the work on 09-23; independent posts from @catwu, @andreisavu, @doodlestein, @TIME and @dyn, plus reposts from @JiaweiLiu, @spikedoanz, @LingmingZhang, @HamelHusain, @julianweisser, @hargup13, @jimmykoppel, @shyamalanadkat, @blaizedsouza, @jfiance and @AccBalanced relayed consistent details, some with demo videos.
- Using Opus 5.5 + Lean on the Agent SDK, a few short prompts yielded 16 bug-fix PRs covering multiple bugs and race conditions; his workflow: have the model write a formal specification, verify it to find bugs, then generate fixes.
- He said TLA+ works equally well and often combines the two to check data flows.
- He later had Opus turn the workflow into an infographic showing LLM-assisted formal modeling for bug finding.
- @doodlestein (Jeffrey Emanuel) characterized it as a formal-verification-driven agent debugging workflow.
Why it matters
- Formal verification traditionally demands deep expertise in proof languages like Lean and TLA+; if developers without that background can run the full pipeline via LLMs, formal methods could reach far broader use.
- Applied to Anthropic's own Agent SDK with real bugs fixed, it is a concrete case of LLM-assisted formal verification moving from theory to engineering practice.
2026-09-23 ~ 2026-09-25 · 19 related posts
Primary sources
- Verifying the Claude Agent SDK with Opus 5.5 and Lean yields 16 bug-fixing PRs — TIME · 2026-09-23
- [source] Dev uses Opus 5.5 with Lean to formally verify Claude Agent SDK, yielding 16 bug-fix PRs — bcherny · 2026-09-23
- [source] Opus turns the Lean-based Agent SDK verification workflow into an infographic — bcherny · 2026-09-23
- Opus 5.5 Formal Verification With Lean Yields 16 Bug-Fix PRs for Agent SDK — HamelHusain · 2026-09-23
15 near-duplicate retellings: hargup13 · andreisavu · _catwu · julianweisser · jimmykoppel · doodlestein · shyamalanadkat · blaizedsouza · JiaweiLiu_ · dyn___ · spikedoanz · bcherny · LingmingZhang · jfiance · AccBalanced