Formally verifying Claude Agent SDK with Lean via Claude: 16 bug-fix PRs from a few prompts
bcherny · x · 2026-09-24
Engineer bcherny shares how he used Claude Opus 5.5 to formally verify the Claude Agent SDK in Lean — a couple of short prompts yielded 16 PRs fixing bugs and race conditions. His workflow: have Claude build a model of the program targeting tricky state machines or race-prone code, find counter-examples (suspected bugs), reproduce them, then fix. It's not whole-codebase verification (yet), just modeling and checking the hairiest parts. He also combines Lean with TLA+ to cover data flow, concurrency, and state management, noting Claude is excellent at both languages even if you aren't.
More from coding & agent
- Dev Shows Copilot CLI Debating Grok Build to Consensus in Cross-Harness Reviews — DanWahlin · 2026-09-24
- Robinhood ships MCP and agent-managed accounts while Schwab offers neither — MartinGTobias · 2026-09-24
- OpenRSI calls for contributors: turn your research into benchmark tasks for frontier agents — ChengleiSi · 2026-09-24
- OpenAI's Neon Connector Reaches Voice Mode but Project-Level Actions Fail on Missing project_id — koltregaskes · 2026-09-24
- Bug Hunt Bench author says his code-review skill significantly lifts model scores — PawelHuryn · 2026-09-24
- 30 annotations with GEPA prompt optimization boost lead scorer accuracy 43%, cut cost 5x — CShorten30 · 2026-09-24