Jul 21, 2026 · 3:24 PM
Subscribe
Home Ai

Cursor's AI Agents Rebuilt SQLite From Scratch and Passed Every Test

A swarm of AI agents at Cursor rewrote SQLite in Rust using only its 835 page manual, with no source code, no tests, and no internet access, then passed every held out test. The company found that model mix changed the total cost by 15 times, from $1,339 to $10,565 for the same result. The experiment lands weeks after Cursor parent Anysphere's reported $60 billion acquisition by SpaceX.

Elroy Fernandes
· 5 min read · 712 reads
Cursor's AI Agents Rebuilt SQLite From Scratch and Passed Every Test

Cursor's new swarm did rebuild a Rust version of SQLite from the manual alone. The real story is more useful than the inflated version: it didn't hit 100% in four hours, and the cost gap is the part you should watch.

Cursor handed a swarm of AI agents the 835 page SQLite manual and told it to build a database in Rust. No source code. No SQLite binary. No test suite. No internet connection. That is a hard test, even before you remember that SQLite sits inside phones, browsers, apps, and operating systems all over the world.

According to Cursor's July 20, 2026 research post, "Agent swarms and the new model economics," the new swarm was graded after each run against sqllogictest, a SQLite project test suite with millions of queries and known correct answers. The agents weren't told the suite existed. By the four hour cutoff, the new runs were passing between 73% and 85% of the held-out tests. Every new configuration later reached 100%, Cursor said, after the four hour mark.

That correction matters. The stronger version of the story isn't that software is now magic. It isn't. The stronger version is that a well-documented system gave AI agents enough surface area to work from, and the agents got much further than a single coding bot reasonably should.

The post also landed on Hacker News on July 20 and drew the predictable split reaction: excitement from people who see a new abstraction layer forming, and suspicion from developers who know how much gets hidden by a clean benchmark. You should hold both ideas at once. Cursor's result is impressive. It is also Cursor's own result, published by a company selling the tooling.

The system worked because the work was split

Cursor's swarm uses two jobs. Planner agents, running on frontier models such as Opus 4.8, break the larger project into smaller tasks. Worker agents, running on cheaper models such as Composer 2.5, do the narrow implementation work. A planner doesn't fill its context with code. A worker doesn't waste its context deciding the whole architecture. That's the design.

It is a practical trick.

Cursor said its earlier browser-building swarm peaked at about 1,000 commits an hour on Git and piled up more than 70,000 merge conflicts before the team paused it. The new system, built with its own version control layer, peaks around 1,000 commits a second. In the SQLite experiment, the new Grok 4.5 run logged fewer than 1,000 merge conflicts over four hours, while the old run hit more than 70,000 before it was stopped before the two hour mark.

The shape of the code changed too. Cursor said the old Grok 4.5 run sprawled to 54 Rust crates, including three separate SQL packages. The new run settled on nine crates early and stayed there. In the Fable 5 mix, both old and new swarms eventually passed the full suite, but the old one needed 64,305 lines of engine code. The new one did it in 9,908.

That is the part developers should take seriously. Fewer lines don't automatically mean better software, but 54 crates and three SQL packages in one rushed database project tells you something has gone badly wrong. The newer swarm didn't merely type faster. It thrashed less.

The cost story is the sharper one

Quality converged. Cost didn't. Cursor ran several model mixes and said the bill ranged from $1,339 for Opus 4.8 as planner with Composer 2.5 as worker, to $10,565 for GPT-5.5 doing the whole job alone. That is not a rounding error. It is the business model hiding inside the benchmark.

In the hybrid Opus and Composer run, Cursor said the planner produced only a small share of the tokens but accounted for roughly two thirds of the cost. The workers produced most of the tokens for the remaining third. Look at that long enough and the obvious conclusion appears: the expensive model doesn't need to do all the typing if it can make the right decisions up front.

Frankly, that is a more believable future for AI coding than the fantasy of one giant agent doing everything. You use the expensive model where judgment matters, then hand clear instructions to cheaper workers. Software teams already work like this when they function well. Cursor is trying to make the machine version cheap enough to run at scale.

There is a commercial caveat here. Reuters reported on June 16 that SpaceX agreed to buy Anysphere, Cursor's parent company, in a $60 billion all-stock deal. Forbes separately noted that SpaceX expected the deal to close in the third quarter of 2026. A company in the middle of a transaction like that has every reason to publish research showing its product can turn frontier model cost into a controllable line item.

That doesn't make the research false. It makes the fine print important.

The biggest fine print is SQLite itself. Cursor chose a system with unusually strong documentation. Most enterprise software doesn't come with an 835 page manual that cleanly describes its behavior. Your internal billing service, half-owned by a team that reorganized twice, is a different creature. So is a decade-old permissions system where the real spec lives in production incidents and Slack threads nobody exported.

Still, the direction is clear enough. Cursor gave agents prose and got back a database that eventually passed the held-out suite. The next test worth watching isn't another famous, well-documented system. It is whether the same swarm can survive the kind of software people actually need rebuilt: messy, underspecified, and full of decisions nobody wrote down.

Also read: China Weighs Locking Down Qwen and Doubao Just as the World Adopted ThemAnthropic drops plan to charge extra for Fable 5 as Chinese rivals close inSouth Korea's Record Exports Show How Deep Its AI Chip Bet Really Goes

TOPICS
Elroy is a digital marketer and developer from Goa, with over a decade of experience web development and marketing. He has been associated with several startups and serves currently as an Editor to the Asia Pacific Industrial magazine. He occasionally writes on Startup Fortune about technology and automation.
Related Articles
More posts →
Loading next article…
You're all caught up