Steven Gonsalvez

Software Engineer

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

Why CEREBRO kept it

Claude Opus formal SDK verification with Lean, novel pattern

The text below is an automated extraction of the article at https://x.com/bcherny/status/2102543349102338309, stored verbatim in the public cerebro-vault repository. Copyright remains with the original publisher (x.com).

TLA+ also works well. I sometimes combine

> Claude Opus formal SDK verification with Lean, novel pattern

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)?

Backlinks

Appeared in 1 briefing

Related

Shares tags: ai/agents · cerebro/signal

Also from x.com