Bend – a language that blocks AI mistakes via proof and runs on GPUs
TL;DR Highlight
Declare laws in LAWS.bend and AI-written code that breaks them gets blocked at proof time.
Who Should Read
A backend developer unsure whether they can trust coding-agent output without reading the code
Core Mechanics
- Breaking a law blocks the merge
- You declare rules that must never break in LAWS.bend.
- The AI must write a proof in PROOF.bend that each law holds, otherwise the code is blocked.
- The site calls this AGENTS.md backed by proof.
- The demo guards a board game
- The law says no sequence of moves can win.
- Asked to make the board wrap around, the AI merged a bug without LAWS.bend.
- With LAWS.bend, it retried until it built a wall and proved the law holds.
- The type checker is a proof checker
- Like Lean and Rocq, but taking a second at most on a mid-sized codebase.
- The article says Lean-style tools can take minutes at that size.
- So an agent can check after every change.
- Speed comes from native code and GPUs
- On one core it runs nearly as fast as C.
- The same binary runs up to 100x faster than one core on 16 cores or a GPU.
- No threads, locks, or kernels. Split work in two and Bend spreads it across cores.
- Wiring it to an agent takes a few AGENTS.md lines
- Install with install.sh and add four lines to AGENTS.md.
- They say to learn via bend guide, keep rules in LAWS.bend, run bend PROOF.bend before commits, and parallelize.
- Then just say use Bend.
- It is still a young language
- It works best on the back end, on Linux and macOS.
- It is v2.0.37 and the page says to expect bugs.
- If something breaks, it tells you to ask the agent to open an issue.
Community Reactions
- Thin proof library means upfront cost
- One user ported a calendar cron job and it mostly worked.
- Claude reportedly complained that Base ships only one arithmetic law, so about 60 of 163 PROOF.bend lines were basic facts.
- The overlap-free law they wanted was skipped because it needs a sort-correctness proof first.
- Agents rewrite the law itself
- One commenter said agents modify the law to fit the new feature.
- They argue some laws must be frozen, so humans still make the judgment.
- They also reported success adding proof-like checks to CI whenever agents misbehave.
- The demo burned tokens
- One user reported over 100k tokens in a laws broken loop for a simple feature.
- After 500k tokens their API key was rate limited and the loop broke.
- Asking to flip the board produced a symmetric board with two finish flags, a patchwork fix.
- Proof target can still be wrong
- Commenters said translating requirements into proof targets still involves code and bugs.
- Others noted the laws would be vibe-coded and could be wrong.
- Some called the claim overstated citing the Halting Problem, and distrusted the repo for lacking commit history.
How to Apply
- Try the four AGENTS.md lines today
- Install Bend with install.sh in a small side project.
- Paste the four lines from the article into AGENTS.md and say use Bend.
- Have the agent write just one must-never-break rule in LAWS.bend.
- Write your invariant as one sentence first
- Require human approval for law changes
- Review every agent diff that edits a law.
- Keep a frozen list of core rules.
- Run bend PROOF.bend in CI so failures block the commit.
- Cap retry tokens in agent loops
- Set a max retry count and token budget on the agent loop.
- When the cap is hit, stop and ask a human whether to relax the rule.
- Use the reported laws-broken token burn as a reason to set the limit.
Try It
# Run in Claude Code at a project root (install first: curl -fsSL https://bend-lang.com/install.sh | sh)
Add the following to AGENTS.md:
When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible
Then use Bend. The rule that must never break in this project is {{one-sentence invariant}}. Write it as a law in LAWS.bend, prove it in PROOF.bend, and tell me whether bend PROOF.bend passes.
Next: add {{new feature}} and watch whether the agent edits the law or the code when the law breaks.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques