When should you use it?
- A migration or build is too big for one agent session
- You can afford many parallel agent runs
- CI can tell you whether merged work still holds
Not for: Small feature tickets one agent can finish; Codebases without automated checks
What do you need, and what do you get?
You need
- A goal and a codebase
- An agent harness that can spawn planner and worker roles
- CI and review capacity
You get
- A rolling task list created by planner agents
- Many worker changes pushed in parallel
- A continue-or-stop call after every round
How does it work, step by step?
- Skip flat peer coordinationAgents sharing one status file with locks slowed to the throughput of a few and avoided risky tasks.
- Give planners the mapLet planner agents explore the code, write tasks and spawn sub-planners for separate areas.
- Let workers grindEach worker takes one task, ignores the bigger picture and pushes when it is done.
- Add a judge per cycleWhen a round finishes, a judge agent says whether to keep going; each new round begins clean.
- Pick models per roleThe team found some models better at planning and long focus, and others quicker to stop early.
The prompt
Our own prompt, inspired by Wilson Lin and written to work in Custom agent. Values in lime are placeholders.
You are the planner for [project]. Explore the codebase and write a task list in TASKS.md: each task small enough for one worker to finish and test alone, with acceptance criteria. Do not write code yourself. Spawn a sub-planner for any area larger than [N files]. After workers push, act as judge: run CI, list what passed and failed, and decide whether another cycle is worth it. Stop if [budget] is reached.
Inspired by Wilson Lin: Scaling long-running autonomous coding · Cursor. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- The authors note the large migration still needed careful human review even though it passed CI.
- Long runs burn a lot of tokens; decide a budget and a stop rule before launching.
Our take
Most teams will never run hundreds of agents, but Wilson Lin's lessons scale down well. Peer agents with no hierarchy drift toward safe, tiny changes; a planner that owns the task list and a fresh start each cycle keeps work honest. Workers that pick one task and finish it avoid the thrashing of everyone editing the same files. The candid note that a three-week migration passed CI yet still needs careful review is the part to remember: green builds are not the same as correct architecture. Keep a human-readable log of what each cycle's judge decided, so a reviewer can see why the run kept going. Pick models per role if cost matters; planners and judges may need stronger models than grind workers. Cap cycle count and spend before launching a long run. Never point a swarm at production credentials. Merge only through normal review, regardless of how confident the judge sounds.
Where the time goes back: Separating planning from execution lets throughput grow with the number of workers instead of collapsing on coordination.
FAQ
What did they build?
Why did optimistic concurrency not fix it?
Source and credit
Inspired by Wilson Lin. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Scaling long-running autonomous coding · Cursor
- Creator
- Wilson Lin
- Published on
- cursor.com
- Original date
- Jan 14, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.