Published on , Aurélien Vandaële

Should you run Claude Code subagents in parallel? What I parallelize, and what I keep in a queue

Yes, but only for agents that read. My research and review subagents, limited to read-only tools, go out several at a time. The ones that edit files, run the test suite or drive a simulator go one by one. Each subagent has its own context, but they all share the same machine, the same working tree and the same git index. That is where parallelism broke for me, three times.

The problem: parallelism that looks free

The Claude Code documentation describes two modes. A foreground subagent blocks the conversation until it is done. A background subagent runs while you keep working, and Ctrl+B sends a running foreground subagent to the background. Nothing stops you from launching four at once.

What is isolated is the context: each subagent has its own window and returns only a result to the main conversation. Everything else is shared. Four agents each running the full suite fight over the CPU. Two agents preparing a commit write to the same git index. Two agents driving a simulator tap on the same screen.

My rule: fan out for reading, queue for writing

It fits in a few lines of my global CLAUDE.md, in the delegation section:

  • Delegate only large, genuinely independent work, such as a search across many files or a migration with one file per agent.
  • Never delegate what you can finish in a handful of tool calls. An agent costs a brief, a fresh context and a summary to read.
  • One agent if one is enough, and ask before spawning any.
  • Fan-out is for reading, not for driving a device. Several agents mapping a module, yes. Several agents tapping a simulator, never.

An example of what I do run in parallel: my review skill for React Native apps launches four angles at once, design, accessibility, performance and security. None of them edits a file or runs a test; they read the code and return findings. The worst case is a duplicate in the report.

My build chain, on the other hand, which writes the tests and then the code for each task, states at the top of its steps "one agent at a time, always": the test suite, the index and the working tree are shared. I describe that chain in the article on writing tests before code.

Three incidents that set the rule

  • August 12, a saturated machine. Four agents launched in parallel on one of my apps each ran the full suite, about 1,000 tests. The load average climbed to around 7. The fix was the "one agent at a time" rule, which has a hidden benefit: a single agent can run the full check before committing, so the check can block the commit.
  • October 24, a parallel step removed the same day. The first version of my plugin kept one exception: while the reviewer read task N, the tests agent could write the tests for task N+1, told not to stage them. The reviewer never runs the suite, so it looked safe. The plugin's final review removed it: the next task's files could end up in the current task's fix commit. The current rule simply says: no parallel step, it broke fixes and staging.
  • An agent that answers late. After a message asking for two more test cases, a tests agent reported itself idle after about two minutes, with the file unchanged on disk. It delivered the work several minutes later. Concluding that the message was lost and dispatching a second agent on the same file would have put two writers on one file. The rule I wrote down: after messaging an agent, wait for its reply, not for an idle notice.

The third case shows that parallelism is not always intended. All it takes is believing an agent is done to launch another one next to it.

What the queue costs, and what it does not solve

The price is time. On a five-task plan, my cost ledger adds up to 38 minutes for the tests, code and fix steps, run one after another, not counting reviews. In parallel it would be shorter on paper. In practice, a task broken by its neighbour costs far more than a wait.

The queue does not protect you from other sessions either. A second session opened on the same folder can commit the files an agent has staged. For that case the answer is one worktree per session, covered in the article on parallel sessions.

Finally, if you really want several agents writing at the same time, the documentation provides the isolation: worktree line in a subagent's frontmatter: it then works in a temporary git worktree. That separates the files and the index, not the CPU or the simulator.

How to start

  • Sort each subagent by what it touches. An agent limited to Read, Grep and Glob can run alongside others.
  • An agent that edits files, commits or runs the full suite goes alone, or in its own worktree with isolation: worktree.
  • One simulator or browser, one agent. My rules for driving it are in the article on the iOS simulator.
  • After messaging an agent, wait for its reply before launching another one on the same files.
  • Write the rule in your CLAUDE.md with its reason, as in the article on CLAUDE.md.

The reviewer remains the best candidate for parallel work: it only reads. What it finds is covered in the article on code review by an agent.

Article written with the help of AI, from my daily practice and my projects.

The whole notebook