Formally verifying the Claude Agent SDK with Lean via Opus yields 16 bug-fix PRs
andreisavu · x · 2026-09-23
Developer @bcherny used Claude Opus to formally verify the Claude Agent SDK with Lean: a couple of short prompts produced 16 PRs fixing various bugs and race conditions.
Key points:
- TLA+ also works well; he sometimes combines Lean and TLA+ to probe data flow, concurrency, and state management
- He doesn't know either language well, but Claude handles both excellently
- A replier, @andreisavu, is doing similar work on Ambion, an agent-human collaboration kernel, formally verifying its durability- and orchestration-critical state machines with LemmaScript and Dafny
More from coding & agent
- As models improve, writing good evals gets harder and more important — amankhan · 2026-11-12
- Omarchy 4.6 lets you share local AI models across your tailnet, says DHH — alexcovo_eth · 2026-11-12
- Coding harnesses hand shell access to inference providers — 4-step gateway mitigation — shensi · 2026-11-12
- Slack's David Hoang: agents beat people on coordination, proposes 'boundary agents' — davidhoang · 2026-11-12
- CS student mourns coding flow states he'll never experience in the AI era — chrissyykat · 2026-11-12
- AI Engineer Code Summit features its first all-female keynote lineup — altryne · 2026-11-12