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
- User automates entire video clipping workflow with Nous Research's Hermes agent — Teknium · 2026-11-12
- As models improve, writing good evals gets harder and more important — amankhan · 2026-11-12
- Prime agent ships with day-one multi-agent communication, runs in Minecraft unmodified — sarahcat21 · 2026-11-12
- Autonomous agent edits just 1,024 weights to lift Qwen3.5 0.8B from 7.4% to 37.4% on MATH-500 — VictorSanh · 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