Run a team of coding agents from one terminal
How a goal is split between coding agents, who checks the work, what goes wrong in practice (stale folders, a stalled planner) and how to avoid it.
By The Cortex66 team · · · 4 min read

Coding agents are good at a clear, small task. They are less good at a large goal with many parts. One way to get further is to run several agents at once, each on its own part, and keep one place where the plan, the progress and the checks live. This article explains how that works in a terminal, and the problems you will probably meet.
Step 1: Split the goal before anyone starts
A good split has parts that can run on their own. Write each part with three things:
- What to do, in one or two sentences.
- What to bring back: a changed file, a test result, a short report.
- Which files it may touch.
The third point matters most. Two agents editing the same file at the same time is the usual way a team run goes wrong. If two parts need the same file, put them in order instead of side by side.
Step 2: Choose who does each part
Different agents suit different parts. One may be better at a careful refactor, another at writing tests or docs. Look at what you have installed and what each did well before. Show the choice, with a fallback, to the person who will say yes. A plan that names who works where is easy to review and easy to change.
Step 3: Give each agent a clean place to work
A common failure is a stale folder. The plan says "start from the latest branch", but an agent starts in a checkout that is days behind. The tests then fail before any work begins, and the agent tries to fix problems that were never its own.
To avoid it:
- Make a fresh checkout or worktree for each part, from the branch the plan names.
- Run the base step of the plan first, before any task.
- If tests already fail before the work, say so and list which ones. The folder may be the cause.
Step 4: Check the work in order
An agent saying "done" is a claim, not a result. Put a check after each part, and let it stop the run when it fails:
- Does the code build?
- Do the tests for the files it touched pass?
- Did it change only the files it was meant to?
- Did a different agent, or you, read the change?
A second agent checking the first one's work is useful, but it still reads the diff as data. Nothing it says replaces a passing build.
Step 5: Expect stalls and plan for them
Two kinds of stall are common:
- A silent agent. It thinks for a long time with no file changes. Count file changes as a sign of life, warn once, and then offer the fallback instead of waiting for ever.
- A planner that stops. It reports "no progress" while several tasks are still ready, or says no other agent can take them. Treat this as a bug to report, not as the end of the run, and look at what is ready.
When an agent times out, do not retry blindly. A timeout after a task has left means you do not know the outcome. Look at the files first, then decide.
How Cortex66 helps
Cortex66 runs this loop from one terminal. Install it with npm i -g cortex66, run cortex66, and connect the AI apps on your computer once with /connect. For a larger goal, the brain splits the work into tasks. Each task says what to do, what to bring back, its cap and who does it, and the split is shown as a receipt that you approve before anything runs. A side canvas shows what is happening in the room, and a result lands as a proposal that you keep or discard.
The AIs never talk to each other directly; the brain passes what one reported into the next brief. Cortex66 has also learned from its own team runs: stalls are counted by file changes, a timeout moves to the shown fallback, and parts that run together go to different AIs. The stale-folder case is a known one we are still working on, so check the start of a run yourself for now.
See the CLI and the room for the details. Cortex66 is free to start.
Read more
- Claude, ChatGPT and Gemini working in one chat
- Which AI model gets which part of your job
- Use the AI subscriptions you already pay for, together
- One cap for every AI
FAQ
How many agents should I run at once?
As many as you have separate parts for, and no more. Start with two or three. More agents mean more checking for you.
What if two agents change the same file?
Avoid it by splitting by file. If you cannot, run those parts one after the other.
Do I have to approve every step?
You approve the split before it runs. After that, each check tells you whether to continue.
Which agents can I use?
Cortex66 works with the AI apps you connect on your computer, such as Codex and Cursor, and with the AIs you connect to the chat. What is available depends on what you have installed.
Read next on this topic
AI for a small business: from schedule to support
One chat with the AIs you already use, your own keys first and a cost cap shown before each task runs.
· 6 min read
Use the AI subscriptions you already pay for, together
How to get more from the AI plans you already have: match each job to the right one, share context, and stop leaving allowance unused.
· 5 min read
How to stop AI forgetting you: a memory you control
Why chatbots forget you between chats, what built-in memory gets wrong, and how a memory you confirm, forget and export works in Cortex66.
· 3 min read


