# Boris Cherny shares prompts for formally verifying Claude Agent SDK

> Original title: Another example, my actual prompts https://x.com/bcherny/status/2102543349102338309?s=20

- Source: Boris Cherny
- Published: 2026-10-06T20:15:45.000Z
- Bad Influence: https://badinfluence.news/items/if1nisd8157sl85x251j91lxj
- Original: https://x.com/bcherny/status/2107565497680314831

## Summary

Boris Cherny says he used Opus 5.5 with Lean to formally verify the Claude Agent SDK, with a couple of short prompts producing 16 PRs fixing bugs and race conditions. He also reports that TLA+ works well, sometimes combined with Lean to find data flow, concurrency, and state management issues. The post links to his actual prompts as another example.

## Post

Another example, my actual prompts https://x.com/bcherny/status/2102543349102338309?s=20

## Quoted post @bcherny

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

https://x.com/bcherny/status/2102543349102338309
