Overview
Cursor's research team details their iterative journey building a multi-agent system capable of orchestrating thousands of AI coding agents to autonomously develop a web browser. The article chronicles the evolution from single-agent approaches through various multi-agent architectures, ultimately arriving at a recursive planner-worker design that achieved ~1,000 commits per hour across 10M tool calls over one week with minimal human intervention.
What You'll Learn
How to design a recursive planner-worker multi-agent architecture for autonomous coding at scale
Why self-coordination among equal-role agents fails and how structured roles with ownership solve coordination problems
How to write effective prompts and instructions for long-running autonomous coding agents
When to accept error rates in multi-agent systems to maximize throughput instead of enforcing 100% correctness
How freshness mechanisms like scratchpad rewriting and automatic summarization prevent agent drift over long sessions
Prerequisites & Requirements
- Understanding of distributed systems concepts (concurrency, locking, synchronization)
- Familiarity with AI/LLM agent systems and prompt engineering
- Understanding of Git workflows (branching, rebasing, merge conflicts)
- Experience with multi-agent or multi-process system design(optional)
- Familiarity with Rust and Cargo build system(optional)
Key Questions Answered
How do you coordinate thousands of AI coding agents working on the same codebase?
Why does self-coordination fail in multi-agent coding systems?
What throughput can a multi-agent coding system achieve?
How should you write prompts for long-running autonomous coding agents?
Should multi-agent coding systems require 100% correctness before committing?
What infrastructure bottlenecks appear when running hundreds of AI agents simultaneously?
How do you prevent AI agents from drifting during long-running sessions?
What models did Cursor use for their multi-agent browser project?
Key Statistics & Figures
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Key Actionable Insights
1Use constraints instead of instructions when prompting AI agents. Negative constraints like 'No TODOs, no partial implementations' are more effective than positive instructions like 'remember to finish implementations' because models generally do good things by default and constraints define clear boundaries around acceptable behavior.This is especially important for long-running agents where ambiguous instructions get amplified over thousands of actions and tool calls.
2Give each agent a single, well-defined role rather than overloading one agent with multiple responsibilities. The continuous executor failed because it was simultaneously asked to plan, explore, research, spawn tasks, check workers, review code, merge outputs, and judge completion. Separating into dedicated planners and workers eliminated pathological behaviors.This mirrors established software engineering principles of single responsibility, but is especially critical for AI agents which become overwhelmed and exhibit erratic behavior when given too many simultaneous objectives.
3Accept a small, stable error rate to maximize throughput rather than enforcing 100% correctness at every step. When every commit had to be perfect, the entire system would grind to a halt from a single typo as multiple agents piled on to fix it. Allowing slack and trusting other agents to fix issues soon keeps the system moving productively.Use a separate 'green' branch with periodic fixup passes for release-quality code, similar to how continuous integration uses staging branches.
4Provide concrete numerical ranges in instructions rather than vague quantifiers. Saying 'generate 20-100 tasks' produces dramatically different behavior than 'generate many tasks,' which defaults to conservative, safe outputs. Specific numbers convey ambition and scope expectations clearly.This applies broadly to any LLM interaction where you need to control output quantity or scope — production systems, batch processing, or task decomposition.
5Invest heavily in observability and logging from the start of any multi-agent system. Log all agent messages, system actions, and command outputs with timestamps for replay and analysis. This data can be fed back into AI tools to identify patterns across large volumes of agent behavior that humans would miss.The Cursor team used their own tool to analyze harness logs, enabling rapid iteration on system design by identifying repeated failure patterns across many agents.
6Design worker agents to operate on isolated copies of the repository and communicate results only through structured handoff reports rather than direct inter-agent communication. This eliminates coordination overhead, prevents cross-talk, and makes the system anti-fragile since individual agent failures don't cascade to others.The handoff should include not just what was done, but concerns, deviations, findings, and feedback so that planners with broader context can make informed subsequent decisions.