Cursor conducted an experiment in which hundreds of agents collaborated to build a browser from scratch, writing 1,000 files and over 1 million lines of code in a week.



Cursor , an AI code editor, conducted an experiment in which it ran a coding agent autonomously to build a web browser.

Scaling Long-Running Autonomous Coding · Cursor
https://cursor.com/en/blog/scaling-agents

Scaling long-running autonomous coding
https://simonwillison.net/2026/Jan/19/scaling-long-running-autonomous-coding/

Existing agents are good at narrow tasks but slow down on complex projects, so the next step is to run multiple agents in parallel, but figuring out how to coordinate them is difficult.

Initially, Cursor thought that detailed planning in advance was too rigid, but the process for large-scale projects was unclear, and the appropriate division of tasks was not clear at the beginning. Therefore, he began to consider 'dynamic collaboration,' in which agents first decide what to do based on the work other agents are doing.

In the first approach, all agents are on equal footing and cooperate autonomously through a shared file. In this approach, each agent sees what other agents are working on, declares the tasks it is responsible for, and updates its progress. A locking mechanism is used to prevent multiple agents from acquiring the same task.

However, it appears that agents held locks for too long or forgot to release them completely. Even when the locking was working properly, it became a bottleneck. Even with 20 agents, the effective throughput dropped to that of 2-3 agents, and most of the time was spent waiting. The system was also fragile, with agents sometimes terminating abnormally while still holding locks, trying to reacquire locks they already held, or updating the reconciliation file without acquiring a lock in the first place.



Instead of locking, Cursor experiments with optimistic concurrency control. With optimistic concurrency control, agents are free to read state, but writes fail if the state has changed since the last time they were read. This is simpler and more robust, but it also leads agents to be less willing to take risks, avoiding difficult tasks and only making small, safe changes. No agent is responsible for the difficult problems or the end-to-end implementation, which results in long periods of useless work running and little progress being made.

Next, instead of a flat structure where all agents do everything, we created a pipeline with separate roles. There are two roles: 'Planner' and 'Worker.' The 'Planner' is responsible for continuously exploring the codebase and creating tasks. It can spawn sub-planners for specific areas, allowing the planning itself to proceed in parallel and recursively. The 'Worker' receives tasks and focuses solely on completing them. Because they don't need to coordinate with other Workers or worry about the bigger picture, they simply work on their assigned tasks until they're finished, and then push their changes.

At the end of each cycle, the Judge agent decides whether to continue, and the next iteration always starts from a clean slate. This solves most coordination issues, allows any agent to contribute progress, and allows us to scale to very large projects.

To validate this system, Cursor tasked a group of agents with building a browser from scratch, which ran for almost a week, successfully writing over 1,000 files and over 1 million lines of code.

The source code for the web browser created by the agents can be viewed on GitHub.

GitHub - wilsonzlin/fastrender: Experimental new browser engine

https://github.com/wilsonzlin/fastrender



Cursor CEO Michael Truell said, 'We built a browser with GPT-5.2 at Cursor. It ran for a week without interruption. It's over 3 million lines of code across thousands of files. The rendering engine was built from scratch in Rust , with HTML parsing , CSS cascading , layout, text shaping, Paint, and a custom JavaScript VM . And now this browser just works! There are still some issues, and it's still a long way from being compatible with Webkit or Chromium , but I was amazed at how quickly and nearly correctly a simple website rendered.' Truell added , 'The browser was coded overnight in one agent grinding session,' which would be about a month's worth of coding time for an engineer in 2023.




Additionally, CEO Truel has released a video showing Cursor building a 3 million+ line web browser in just one week.




In another experiment, we performed an in-place migration from Solid to React on the Cursor codebase, a massive update that took over three weeks but added 266,000 rows and removed 193,000 rows.



In yet another experiment, we used the agent to improve an upcoming product release. A long-running agent achieved 25x faster video rendering with a highly efficient Rust implementation. We also added support for natural spring transitions that follow the mouse cursor, and smooth zooming and panning with motion blur. This code has already been merged and will be deployed to production soon.

Cursor says, 'Multi-agent cooperation remains a difficult problem. Existing systems work, but they are far from optimal. Planners should be able to wake up when a task is completed and plan the next step, and agents may continue to run longer than necessary. Periodic clean restarts are also necessary to deal with drift and tunnel vision. However, the essential question, 'Can autonomous coding be scaled by increasing the number of agents?' The answer is more optimistic than initially expected. Hundreds of agents can collaborate on a single codebase for weeks, making steady progress even on ambitious large-scale projects. The technology we are developing here will eventually be reflected in Cursor's agent functionality. ' He revealed that multi-agent cooperation will be reflected in Cursor's agent functionality in the future.

in AI,   Video,   Software, Posted by logu_ii