Formally verifying the Claude Agent SDK in Lean yields 16 PRs fixing bugs and races
doodlestein · x · 2026-09-23
Developer Jeffrey Emanuel showed a formal-methods-driven debugging workflow: using Opus to formally model the Claude Agent SDK in Lean, a couple of short prompts surfaced and fixed 16 bugs and race conditions via 16 PRs.
He says he barely knows Lean or TLA+ himself, but the model excels at both; he sometimes combines Lean and TLA+ to probe data-flow, concurrency, and state-management issues. The approach is packaged as the open lean-formal-feedback-loop Claude Code skill (Lean 4 + Rust, 1,857 installs), which runs Lean-Rust proof feedback loops to catch runtime bugs.
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