Boris Cherny Used Opus 5.5 + Lean to Formally Verify Claude Agent SDK, Shipping 16 Bug-Fix PRs
AccBalanced · x · 2026-09-25
Boris Cherny used Opus 5.5 to formally verify the Claude Agent SDK with Lean, the theorem-proving assistant—a few short prompts produced 16 PRs fixing real bugs and race conditions, despite him not knowing Lean well.
Bugs found include a session phase where a sandbox network request and a permission prompt could both resolve and leave the session waiting forever, a retry loop fighting a token cutoff guard, and a streaming response ending mid-message but logged as success with no error or cost recorded. He says TLA+ also works well and he sometimes combines both to check data flow, concurrency, and state management in one pass. He asks whether formal verification is the future of coding—or at least of bug finding.
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