@bcherny: I used Opus 5.5 to formally verify the Claude Agent SDK using Lean. A couple short prompts = 16 PRs fixing various bugs…

X AI KOLs Timeline News

Summary

The author used Claude's Opus 5.5 model to formally verify the Claude Agent SDK using Lean, generating 16 PRs to fix bugs and race conditions, and recommends combining Lean with TLA+ for enhanced bug finding.

I used Opus 5.5 to formally verify the Claude Agent SDK using Lean. A couple short prompts = 16 PRs fixing various bugs and race conditions. Video attached. TLA+ also works well. I sometimes combine Lean and TLA+ to look for issues around data flow, concurrency, and state mgmt. I don't know either language well, but Claude is excellent at both. This approach is super useful for formally modeling your code and finding bugs that a human probably wouldn't have spotted. Is formal verification the future of coding (or at least, bug finding)?
Original Article
View Cached Full Text

Cached at: 09/23/26, 02:00 AM

I used Opus 5.5 to formally verify the Claude Agent SDK using Lean. A couple short prompts = 16 PRs fixing various bugs and race conditions. Video attached.

TLA+ also works well. I sometimes combine Lean and TLA+ to look for issues around data flow, concurrency, and state mgmt.

I don’t know either language well, but Claude is excellent at both. This approach is super useful for formally modeling your code and finding bugs that a human probably wouldn’t have spotted.

Is formal verification the future of coding (or at least, bug finding)?

Similar Articles

Getting the most out of Opus 5.5 in Claude and Claude Code

Hacker News Top

Anthropic published a practical guide on getting the most out of Opus 5.5 in Claude and Claude Code, covering how to hand over whole tasks with clear finish lines, drop "think carefully" lines since the model always reasons before replying, and steer long autonomous coding runs.