, I’ll focus on find out how to orchestrate numerous completely different brokers utilizing Claude Code or another coding brokers
Once you work with coding brokers, you need to run as many brokers in parallel as attainable. That is what makes working with brokers so efficient. The truth that you are able to do work in parallel and thus get extra complete work performed.
Nonetheless, one of many challenges with spinning up numerous brokers without delay is conserving an summary of all of the brokers and answering the brokers every time they’ve questions for you.
On this article, I’ll focus on how one can take care of this and how one can transfer even yet another abstraction layer up by speaking on to brokers coordinating a set of different brokers. I take advantage of these strategies every day to run 100+ brokers in parallel.

Why orchestrate numerous brokers?
To start with, I wish to cowl why I’m speaking concerning the particular subject. On this article, I’ll be discussing, or I need to spotlight, why you need to orchestrate numerous brokers.
The straightforward reply is that orchestrating numerous brokers lets you do extra work.
And then you definitely would possibly ask your self why doesn’t everybody simply orchestrate a bunch of brokers? The rationale for that is that there are some challenges when working numerous brokers:
- How do you outline and scope particular duties completely different brokers can work on, so the brokers don’t intrude with one another’s work
- How do you retain monitor of all of your brokers?
- How do you reply all of the requests when the brokers have questions for you? And the way do you choose up on the context of every agent every time it’s a must to give a solution to the agent?
All these are challenges that make it exhausting to orchestrate numerous brokers without delay. Nonetheless, there are methods to orchestrate extra brokers, and the reply is principally to maneuver one abstraction layer up. It is advisable transfer to a layer the place you speak to 1 agent which may itself orchestrate a number of different brokers.
That is the subject I’ll be discussing in the present day. I’m not gonna be discussing working sub-agents with Claude Code or Codex. I’ll actually be discussing find out how to run a number of Claude Code or Codex periods on the similar time.
Tips on how to orchestrate numerous brokers
Beginning headless periods
The quick reply to the query of find out how to orchestrate numerous brokers is to make use of headless mode.
Headless mode in each Claude Code and Codex is principally a mode the place you may spin up a session utilizing the CLI and have the agent work on a specific process and solely come again to you with the reply.
I take advantage of this extensively, for instance, to carry out code evaluations with Codex, which is a subject I’ve lined in quite a few earlier articles and is likely one of the simplest strategies I’ve to scale back the quantity of bugs in your software.
You possibly can activate headless mode with Claude Code utilizing:
claude -p "your immediate right here"
And you may activate headless mode with Codex utilizing:
codex exec "your immediate right here"
What’s gonna occur when you run that is that you simply’re gonna spin up a very separate Codex or Claude Code session, and that session is gonna work on the command you offered till it’s accomplished the duty. The orchestrator agent, which you’re speaking to, will then solely see the logs if it chooses to, and the ultimate results of the command would be the output of the agent, for instance, if work was accomplished. An instance response you would possibly get from the agent is:
The duty was mounted and merged to dev.
Usually, when working the command, you may additionally add another settings, for instance, permitting the brokers to run with out asking for permissions. Permitting instruments, setting max turns, specifying which mannequin to make use of, and so forth.
Being efficient with headless mode
I’ll cowl three primary strategies to be efficient with headless mode:
- Offering a method for the agent to confirm its personal work
- Discovering appropriate duties for headless modes, akin to refactoring
- Give the agent all of the instruments it wants
Offering a method for the agent to confirm its personal work
Now, one factor is, in fact, to have the ability to spin up numerous periods and brokers utilizing headless mode. One other factor, which is in fact essential, is how are you gonna be efficient with the brokers like this?
One of many challenges is you can’t be immediately concerned in all the decision-making. Because you’re shifting one abstraction layer up, it’s a must to make the brokers carry out extra selections. Which supplies you much less management in a method. Thus, it’s a must to change the way in which you immediate the mannequin to be extra high-level, and it’s a must to inform it find out how to confirm its work.
Once more, we come again to the identical subject, which I lined so much beforehand, highlighting how it is advisable present the brokers with methods to confirm the work.
Discovering appropriate duties for headless modes, akin to refactoring
One other essential factor if you use brokers like that is to use them to duties which can be nicely suited to headless mode. Extra difficult duties in themselves aren’t suited to headless mode and are most likely higher off with extra of your enter. Additionally, for duties which can be very imprecise and the place you don’t absolutely perceive it your self, you also needs to work together immediately with the coding brokers
Nonetheless, one process that’s significantly nicely suited to headless mode is refactoring.
After the discharge of Claude Fable, I used it, in fact, to detect points and refactoring alternatives in my code to make my coding brokers more practical. This might be discovering points akin to:
- Poor separation of considerations
- Safety vulnerabilities
- Poor structure selections
You possibly can simply do that proper now utilizing the command beneath:
search for refactor alternatives on this repository and supply
them to me in a prioritized method in an HTML file and make a plan on how
to repair it
This can nearly definitely discover a bunch of points which you need to undoubtedly repair, particularly if you happen to’re utilizing probably the most highly effective coding brokers on the market, akin to Claude Fable.
After you’ve performed this, you have got a full plan. You must now convert this plan utilizing the next immediate
Take the plan and construction a method for us to implement it.
I will be utilizing probably the most highly effective coding agent as an orchestrator, and that
coding agent ought to spin up a bunch of Claude Code headless periods utilizing
Claude Opus to get every particular person process performed. Guarantee that duties that
could be performed in parallel are spun up in parallel and proceed working till
you end the refactoring utterly.
I’ve been utilizing this up to now few days now that Fable grew to become accessible once more with the Claude Code subscription, and I believe it’s labored rather well. To start with, I haven’t needed to spin up numerous Claude Code periods myself with all of the duties and refactoring alternatives that the agent discovers, and it’s really been very efficient at getting stuff to manufacturing.
Give the agent all of the instruments it wants
Lastly, it’s additionally essential to offer the agent all of the instruments that it wants. Once you run Claude in Headless Mode, it’s exhausting for the orchestrating agent to work together with it, and also you need minimal interactions. The purpose of Headless Mode is to easily present a one-stop store immediate which will get some work performed and stories again when it’s performed, similar to a standard sub-agent, however much more highly effective, in fact. If you would like this performed, it is advisable give the agent all of the instruments that it wants; it would want MCP entry, it undoubtedly must be allowed to carry out actions autonomously, and so forth. Thus, I urge you to offer the brokers numerous freedom, in fact, whereas nonetheless conserving management over them to allow them to carry out work autonomously and report again to their orchestrating agent once they’re performed.
Conclusion
On this article, I mentioned find out how to orchestrate 100+ brokers by using brokers as orchestrating brokers to spin up a bunch of different brokers. I imagine it is a very highly effective approach you can apply to your individual coding straight away to realize an enormous benefit and change into much more productive together with your programming. I take advantage of this system every day to spin up a whole lot of brokers to work in parallel and to get work performed. I imagine the way forward for programming will simply be that we transfer additional and additional up the abstraction layers, and the strategies I offered on this article are a approach to get one abstraction layer up out of your regular Claude Code interactions.
👉 My free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day Electronic mail Course)
📚 Get my free Imaginative and prescient Language Fashions e book
💻 My webinar on Imaginative and prescient Language Fashions
👉 Discover me on socials:
💌 Substack















