@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

I let Codex and Claude Opus work on the same Java AI agent monolith

Reddit r/AI_Agents

A developer compares Codex 5.3 and Claude Opus 4.6 on autonomous Java AI agent development, finding that the model with more elegant architecture (Claude) often produced code that never executed, while the more boring and direct Codex improved the working product with practical fixes like timeouts and history recovery.

An update on recent Claude Code quality reports

Anthropic Engineering

Anthropic released a postmortem addressing recent quality reports for Claude Code, identifying and fixing three issues related to reasoning effort defaults, session state management, and system prompts that affected Sonnet and Opus models.