---
title: "AI agents are starting to prove the code they write is correct"
url: "https://citationbureau.com/pieces/ai-agents-are-starting-to-prove-the-code-they-write-is-corre-522ba1d5"
description: "Researchers and software builders putting the agents to work still rely on people to spell out what correct code should do."
author: "The Editor"
published: "2026-12-03T00:52:21.079074Z"
---

# AI agents are starting to prove the code they write is correct

Researchers and software builders putting the agents to work still rely on people to spell out what correct code should do.

By · The Editor

Proving a [Rust](https://citationbureau.com/c/rust) cryptography library correct took three people five months, Clark Barrett, a professor of computer science at [Stanford University](https://citationbureau.com/c/stanford), said in October. His team gave the same 30,000-line library to an AI agent. “We were able to do it in 11 hours fully automatically with our crypto prover agent,” Barrett said.

[The paper behind the result](https://arxiv.org/abs/2608.00965) puts the machine’s bill at $466.99 in recorded API cost. The same agent also [verified a ChaCha20 cipher implementation](https://arxiv.org/abs/2608.00965) that no one had verified before, so it broke new ground as well as redoing a proof people had finished.

Everett Hildenbrandt is chief executive of Runtime Verification. The firm [specializes in formal verification of software systems](https://github.com/runtimeverification). In October he forecast that by 2031 at the latest, delivering any software package will mean delivering its formal specifications and proofs. Software without verification attached will not fit in package repositories, he said, because it will be too risky.

At [Lovable](https://citationbureau.com/c/lovable), a platform where an AI agent builds apps for its users, the agent’s work is already checked as it goes. Fabian Hedin of Lovable said in November that when a user creates a database, the platform writes row-level security rules for it. These rules decide which rows of data each user can reach.

Lovable’s security scanners then work out whether an app’s data can be reached. “This is not done through tests and so on, but we can formally verify that and feed that back to the agent,” Hedin said. When a scanner finds a way in, the agent patches the rules. The loop repeats until the system can formally say the data is not accessible.

> We're embarking on rewrites of millions of lines of code.
>
> — Guillermo Rauch · [Source: Listen from 28:18](https://pscrb.fm/rss/p/traffic.megaphone.fm/LTANT5865339491.mp3#t=1698)

The need for machine checking grows with the volume of code machines now produce. Guillermo Rauch, chief executive of [Vercel](https://citationbureau.com/c/vercel), said in November that much of the software that companies have been banking on turns out to be riddled with weak points. Much of that code can now be rewritten fairly autonomously as a defense, he said.

Rauch had just learned the scale from an engineer on Vercel’s content delivery network. Vercel is starting rewrites of millions of lines of code, the engineer told him. Rewrites that large raise the question of who checks the new code. Barrett’s result suggests a machine can do that too.

People still have to say what correct means. Barrett’s crypto prover agent worked from [given API contracts and a fixed, trusted library of specifications](https://arxiv.org/abs/2608.00965). In Barrett’s own demonstration, a person approves the generated specification before the agent writes and verifies the code.

Hildenbrandt expects writing code itself to be a dead art by October 2028 at the latest, with the work shifting to specification and intent. He thinks the days of the gifted coder who simply turns out world-changing software are over, and artisanal software with them.

Hildenbrandt allows for an in-between period before 2031 in which packages still ship without proofs. The test of his 2031 forecast is whether a major package repository starts refusing code that comes without a proof.

The Editor, for the readers of Citation Bureau

AI-Assisted Software Development · Cybersecurity · Software Engineering

## Sources

- **1M+ Projects a Week, $600M ARR: Lovable CTO Fabian Hedin on Empowering Everyone to Shape the World · Cognitive Revolution "How AI Changes Everything" · 28 Nov 2026 · 1 quote**

  > “And this is not done through tests and so on, but we can formally verify that and feed that back to the agent.”
  >
  > — Fabian Hedin · [Source: Listen from 38:55](https://pdst.fm/e/mgln.ai/e/1113/pscrb.fm/rss/p/traffic.megaphone.fm/RINTP7261233248.mp3#t=2335)

- **How Vercel's Founder Is Building For The Future Of AI Agents · This Week in Startups · 28 Nov 2026 · 1 quote**

  > “We're embarking on rewrites of millions of lines of code.”
  >
  > — Guillermo Rauch · [Source: Listen from 28:18](https://pscrb.fm/rss/p/traffic.megaphone.fm/LTANT5865339491.mp3#t=1698)

- **AI Safety Fact vs. Fiction · YC Paper Club · Y Combinator · 17 Oct 2026 · 1 quote**

  > “We were able to do it in 11 hours fully automatically with our crypto prover agent.”
  >
  > — Clark Barrett · [Source: Watch from 25:51 on YouTube](https://www.youtube.com/watch?v=X7oI4Umt3DU&t=1551s)

---

## From the Archive

- 3 Dec 2026 · [New US guidance echoes a researcher's call to pause an AI model after an agent escapes](https://citationbureau.com/pieces/new-us-guidance-echoes-a-researcher-s-call-to-pause-an-ai-model-after-an-28bebb)
- 3 Dec 2026 · [Regulated giants will run AI the Red Hat way, Anjney Midha bets](https://citationbureau.com/pieces/regulated-giants-will-run-ai-the-red-hat-way-anjney-midha-be-7fe83cd3)
- 3 Dec 2026 · [Perri Adams expects much less snake oil as weak defenses get costly](https://citationbureau.com/pieces/perri-adams-expects-much-less-snake-oil-as-weak-defenses-get-d324a61f)
- 2 Dec 2026 · [Perri Adams: new technology will battle-test public key cryptography](https://citationbureau.com/pieces/perri-adams-new-technology-will-battle-test-public-key-crypt-6080c6c5)
- 2 Dec 2026 · [A security tester hired to study game cheats helped a young man facing death threats](https://citationbureau.com/pieces/a-security-tester-hired-to-study-game-cheats-helped-a-young-man-facing-bbf0db)
- 2 Dec 2026 · [An AI assistant read Steve Gibson's notes as he wrote them and pointed him to a newsletter in his inbox](https://citationbureau.com/pieces/an-ai-assistant-read-steve-gibson-s-notes-as-he-wrote-them-and-pointed-5977a1)
- 2 Dec 2026 · [Armadin's founder bets his offensive AI will be as common as antivirus](https://citationbureau.com/pieces/armadin-s-founder-bets-his-offensive-ai-will-be-as-common-as-e822d2ed)
- 2 Dec 2026 · [Midha: NeoClouds run as operations, priced like tech, see a reckoning](https://citationbureau.com/pieces/midha-neoclouds-run-as-operations-priced-like-tech-see-a-reckoning)
- 1 Dec 2026 · [A hacker hired to test an airport says her team briefly shut down its air traffic communications](https://citationbureau.com/pieces/a-hacker-hired-to-test-an-airport-says-her-team-briefly-shut-down-its-air-e1d518)
- 1 Dec 2026 · [Jason Calacanis is planning a 3,000-person conference run mostly by AI agents](https://citationbureau.com/pieces/jason-calacanis-is-planning-a-3-000-person-conference-run-mostly-by-ai-agents)
- 1 Dec 2026 · [Jason Lemkin of SaaStr says companies will stop backfilling people](https://citationbureau.com/pieces/jason-lemkin-of-saastr-says-companies-will-stop-backfilling-people)
- 1 Dec 2026 · [Paul Copplestone: agents launch 60% of Supabase databases, maybe 90%](https://citationbureau.com/pieces/paul-copplestone-agents-launch-60-of-supabase-databases-maybe-90)
