English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Cursor's Agent Swarm Writes a Rust SQLite Clone in 4 Hours, Passing 80% of Tests

Forum topic · 小凯 · 2026-07-21

Summary

Cursor published results from an internal experiment in which an Agent Swarm rebuilt SQLite from scratch in Rust using only the 835-page SQLite manual, with no source code, binaries, or internet access. A Grok 4.5 configuration passed about 80% of SQL Logic Tests after four hours and reached 100% with more time. Cursor split agents into a planner role (top-tier models such as Opus 4.8 or Fable 5) and an executor role (cheaper models such as Composer 2.5), mirroring a company structure rather than a shared chat. Compared with the old swarm architecture, merge conflicts fell from over 70,000 to under 1,000 and the codebase stabilized at 9 crates instead of 54. Total four-hour cost ranged from $1,339 to $10,565, with executors consuming 69% to over 90% of tokens. The open-source cursor/minisqlite repo has grown to roughly 200,000 lines of Rust, 14 crates, and 5,650 tests, though it lacks C API, prepared statements, and cross-process concurrency.

Cursor's Agent Swarm Writes a Rust SQLite Clone in 4 Hours, Passing 80% of Tests

Source: Cursor official / sqllogictest / cursor/minisqlite Date: 2026-07-21

  • Cursor official: https://cursor.com/blog/agent-swarm-model-economics
  • SQLite sqllogictest: https://www.sqlite.org/sqllogictest/doc/trunk/about.wiki
  • Public repository: https://github.com/cursor/minisqlite
---

Cursor handed a fleet of coding agents the 835-page SQLite manual and asked them to rebuild the database from scratch in Rust. No source code, no SQLite binary, and no internet access. After four hours, a Grok 4.5 configuration passed about 80% of SQL Logic Tests. An older swarm configuration spun into uncontrolled loops in under two hours and was stopped manually.

This is not "running several Claude Code sessions in parallel." Cursor reorganized the agents into a corporate-style structure. The strongest model acts as the planner, only decomposing tasks, setting boundaries, and resolving conflicts. Faster, cheaper models act as executors, each focusing on a single narrow problem. The planner never writes implementation code; the executor never alters the overall design. Context is partitioned by role, more like a company than a group chat.

Coordination Cost Is the Real Differentiator

Cursor ran four configurations in parallel: GPT-5.5 end-to-end, Grok 4.5 end-to-end, Opus 4.8 planning plus Composer 2.5 executing, and Fable 5 planning plus Composer 2.5 executing. At the four-hour mark, the new architecture reached 73% to 85% test pass rates, and all four groups eventually reached 100% with more time.

The old architecture failed in very specific ways. In two hours, the legacy Grok 4.5 setup produced 68,000 commits, more than 70,000 merge conflicts, and split the codebase into 54 crates, including three mutually incompatible SQL packages. The new architecture stabilized at 9 crates early and accumulated fewer than 1,000 conflicts over four hours.

Instead of pushing Git harder, Cursor built a dedicated version control system from scratch. Early browser experiments on Git peaked at roughly 1,000 commits per hour; the new system is designed for roughly 1,000 commits per second. Throughput is not the point. The point is that conflict resolution, design-doc references, and merge queues are baked into the collaboration infrastructure itself.

Failure modes are documented candidly: two planners can produce conflicting designs, executors fight over hot files, and code hardens into a core that no one dares touch. Cursor's mitigations include shared design documents, compile-time references, third-party merge agents, and a policy of "allowed to break old interfaces when justified." This section is more valuable than the 80% headline. It shows that the main challenge in multi-agent engineering is not whether models can write code, but whether the organization can stay stable.

Model Cost Depends on Where It Sits in the Pipeline

Four-hour runtime costs ranged from $1,339 to $10,565. The most expensive setup, GPT-5.5 end-to-end, spent $9,373 on executors alone. When Opus 4.8 handled planning and Composer 2.5 handled execution, the entire executor team cost only $411.

Executors consumed at least 69% of tokens, and over 90% in most configurations. Planners use fewer tokens but have a higher unit price, and in the Opus hybrid setup the planner still accounted for roughly two-thirds of the bill. The takeaway is practical: frontier models do not need to blanket the entire pipeline; they only need to guard the high-ambiguity, high-impact decision points.

The public cursor/minisqlite repository has grown well beyond the four-hour demo. The README shows it has since expanded to about 200,000 lines of Rust, 14 crates, and 5,650 tests. It can read and write SQLite format 3 files bidirectionally and supports WAL, transactions, triggers, window functions, and foreign keys. The limits are equally clear: no C API, no prepared statements, no cross-process concurrency, and no cost estimation based on sqlite_stat1. It is not yet a drop-in replacement for SQLite.

Three Things to Watch

First, the 80% number comes from an in-house test whose questions, runtime, and human review were all controlled by Cursor. The code is public, but independent reproduction is the next step.

Second, once agent swarms make "writing code" cheap, specifications become the new scarcity. The 835-page manual was written precisely enough that the swarm could compile the text into a system layer by layer. Bad requirements will only be amplified in parallel.

Third, Cursor has pushed the competition from the model layer to the organizational layer. Future comparisons between Claude Code, Codex, and Cursor will lean less on SWE-bench alone. Whoever can keep dozens of agents from fighting, support auditing, and enable clean rollback will be the closest thing to an automated software company.

In one sentence: the most important number in this experiment is not 80%, but 70,000 conflicts compressed to under 1,000. The next step in AI coding is not finding a smarter programmer model, but building a corporate system that does not collapse under a swarm.

Tags

#ai-coding#agent-swarm#cursor#rust#sqlite#multi-agent-systems#model-economics#software-engineering

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178446976