Run coding agents in long autonomous cycles
Use a planner-worker loop with periodic review to keep coding agents moving on a large repository task.
- What they did
- Cursor tried to scale one project by running hundreds of agents at once. A shared coordination file with locks, and later optimistic concurrency, did not hold up, so they changed the design: one set of planners inspected the codebase and turned work into tasks, while separate workers handled those tasks and pushed changes. At the end of each pass, a judge agent chose whether to launch another round, and each new round began from a clean state.
- How it went
- Using that setup, Cursor built a browser from scratch in about a week and ended up with more than 1 million lines across 1,000 files. They also used it for a Solid-to-React migration that ran for more than three weeks, passed CI, and still needed careful human review. Even then, some agents kept going too long, so fresh resets were still necessary to limit drift.
- Tips
- Give the agent small, checkable tasks and make it prove progress often. Leave a human approval step before any commit, push, deletion, or submission, and plan for periodic restarts when the work starts to wander.
Try it yourself with Cursor
I want an agent to keep working on [large repo task] in [repo] for an extended period. First, inspect the codebase and split the work into small tasks that can be checked independently. Then assign one worker per task, have each worker make the change, run tests, and wait for my approval before any commit, push, delete, or submission. After each cycle, summarize what changed, what failed, and whether the job should continue. Stop if the goal is done or if you hit [number] failed attempts in a row, and start the next cycle from a fresh plan.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Use Cursor to spot prototype gaps and draft a build plan
A founder used Cursor to inspect a trip-planning app, surface missing pieces, sketch screens, and then build a feature with parallel agents.
Use Cursor to run Terraform through MCP
A developer used Cursor with tfmcp to plan and apply Postgres Terraform changes, then fell back to the terminal when permissions blocked the first attempt.
Automate large service upgrades with self-checking agents
Brex used Cursor agents to let one engineer update 180 microservices to a newer Micronaut release in roughly a month.
Use Devin for one integration, one migration, and a review
Answer.AI tested Devin on three coding tasks, but the migration stalled and the security pass mixed valid findings with mistakes.
Let a background agent watch tasks and open PRs
A team keeps a server-based agent running so Cursor can monitor work and turn finished tasks into pull requests.
Triage upgrades and move major ones in stages
Kent C. Dodds used Cursor to organize site dependency work, then carried out a Remix v2 to React Router v7 migration and related updates.