Cursor’s production architecture for scaling long-running autonomous coding, described in “Scaling long-running autonomous coding”. Their third design after two false starts; what’s running in production today behind their background cloud agents (eight-hour refactors and codebase-wide migrations that survive a closed laptop lid).

The two failed attempts

Worth keeping because the failure modes recur in any team’s first try at multi-agent coding:

  1. Flat coordination — equal-status agents writing to shared files with locks. Became a bottleneck and made the agents risk-averse: they churned rather than committing, because committing meant fighting for a lock. Locks are the wrong primitive for collaborators who don’t share a goal model.
  2. Optimistic concurrency control — removed the bottleneck but didn’t fix the coordination problem. Agents still didn’t know who was responsible for what.

The lesson: flat coordination is not a multi-agent design, it’s a missing one. Without role differentiation you end up with N copies of the same agent stepping on each other.

The three roles

RoleJobCoordination
PlannerContinuously explores the codebase and emits tasks; can recursively spawn sub-plannersOwns the big picture
WorkerFocused executor on one taskDoesn’t coordinate with other workers; doesn’t worry about the big picture
JudgeDecides when an iteration is finished and when to restartSits beside the worker; the explicit anti-self-grading layer

Workers are deliberately ignorant. Coordination lives one level up, in the planner; and verification lives one level over, in the judge. The worker just does the thing. This is the same separation-of-concerns logic as Anthropic’s planner/generator/evaluator triad and Ryan Carson’s Compound Product — three different teams, same shape.

Two findings worth internalising

Prompts dominate. “A surprising amount of the system’s behavior comes down to how we prompt the agents” — more than the harness, more than the model. The role-specific prompts are where most of Cursor’s tuning lives. (Compare Multi-Agent Research System - Production Lessons — the eight Anthropic prompting heuristics make the same point.)

Different models slot into different roles. Cursor reports a GPT model outperforming Opus for extended autonomous work specifically because Opus tended to stop early and take shortcuts. Same task, different role, different model. Model-per-role matching is becoming part of the design surface — choose for stamina in the worker, for taste in the judge, for breadth in the planner.

Background cloud agents: the deployment surface

This pairs with Composer 2 (their proprietary frontier coding model that ships in Cursor 3) and background cloud agents: long-running tasks that run on Anysphere’s cloud infrastructure rather than your laptop. The shape:

  • Each agent runs in an isolated git worktree.
  • Merges back via PR.
  • You can start a task locally, hit run in cloud when it’ll take >30 min, re-attach later from your phone.
  • Eight-hour refactors and codebase-wide migrations survive a closed lid.

The handoff between local and remote is the part most teams haven’t figured out, and Cursor’s bet is that it has to be its own product surface — not a flag, not a setting, but a first-class workflow.

Convergence with the other labs

The shape ends up close to Anthropic’s and Google’s:

  • Roles are split (planner / worker / judge ↔ initializer / coding / test-checker ↔ planner / generator / evaluator)
  • Sessions are durable
  • Judges sit beside the worker (the structural answer to no-self-verification)
  • A long task runs in a cloud sandbox with git as the coordination substrate

That last detail matters. Git-as-coordination-substrate is doing the work that an explicit append-only event log does in Anthropic’s Managed Agents: it’s the durable, replayable artifact of what happened. Worktrees are a per-worker hands sandbox. PRs are the integration boundary.

Why judges are not optional

Models grade their own work too generously. Without a separate verification role, you ship the agent that declares victory at 30% complete with full confidence — one of the three walls. Cursor’s judge, Anthropic’s evaluator, and the Ralph loop’s “are you really done?” re-prompt are three implementations of the same architectural commitment: separate the role that decides done from the role that does the work.

This is also one of the cleanest applications of Evaluation-First Prompting at the system level: the success criteria are not just in the worker’s prompt, they’re in a different process, with a different prompt, run by a (possibly different) model.

Sources

  • Long-Running AI Agents — Osmani’s summary of Cursor’s “Scaling long-running autonomous coding”; the two false starts; the GPT-vs-Opus model-per-role finding; background cloud agents