How to schedule 100+ agents with Claude Code

I will discuss how to program multiple different agents using Claude Code and any other coding agents.
When working with coding agents, you want to use as many agents in parallel as possible. This is what makes working with agents so successful. The fact that you can do the work in parallel and thus get more complete work.
However, one of the challenges with being around multiple agents at once is keeping an eye on all the agents and answering the agents whenever they have questions about you.
In this article, I will discuss how to deal with this and how to remove one layer of abstraction from the top by talking directly to agents that connect a set of other agents. I use these methods daily to run 100+ agents in parallel.
Why organize multiple agents?
First, I would like to cover why I am talking about a particular topic. In this article, I will be discussing, or wanting to highlight, why you should organize multiple agents.
The simple answer is that scheduling multiple agents allows you to do more work.
And then you might be wondering why isn't everyone just making a bunch of agents? The reason for this is that there are some challenges when using multiple agents:
- How to define and assign specific tasks that different agents can work on, so that agents do not interfere with each other's work
- How do you track all your agents?
- How do you respond to all requests when agents have questions about you? And how do you capture the context of each agent whenever you have to give feedback to an agent?
All of these challenges make it difficult to schedule multiple agents at the same time. However, there are ways to organize multiple agents, and the answer is basically to move one layer of abstraction to the top. You need to go to a place where you talk to one agent who can arrange several other agents.
This is the topic I will discuss today. I won't discuss handling sub-agents with the Claude Code or the Codex. I will be discussing how to run multiple Claude Code or Codex sessions at once.
How to schedule multiple agents
Starting headless sessions
A short answer to the question of how to configure multiple agents to use headless mode.
Headless mode in both Code Claude and Codex is basically a mode where you can interrogate time using the CLI and have the agent run a task and only return to you with a response.
I use this a lot, for example, to do code reviews with Codex, which is a topic I've covered in many previous articles and it's one of the most effective ways I have of reducing the number of bugs in your application.
You can activate headless mode with Claude Code using:
claude -p "your prompt here"
You can also enable headless mode with Codex using:
codex exec "your prompt here"
What will happen once you run this is that you will launch a completely different Codex or Claude Code session, and that session will run on the command you gave it until it finishes the job. The orchestrator agent, which you talk to, will only see the logs if it chooses, and the final result of the command will be the result of the agent, for example, when the job is finished. An example of the response you might get from an agent is:
The task was fixed and merged to dev.
In general, when you use the command, you can also add other settings, for example, to allow agents to run without asking for permissions. Enabling tools, setting the maximum curve, specifying which model to use, and more.
Better performance in headless mode
I'm going to cover three major techniques to make it work in headless mode:
- To provide a way for the agent to verify their work
- Finding suitable functions for headless modes, such as regeneration
- Give the agent all the tools they need
To provide a way for the agent to verify their work
Now, one thing, of course, is to be able to investigate multiple times with agents using headless mode. Another thing, which is important, is how will you work with agents like this?
One of the challenges is that you cannot be directly involved in all the decision making. As you move one layer up, you have to make agents make multiple decisions. Which gives you a little control by the way. So, you have to change the way you make the model to be better, and you have to tell it how to verify its function.
And, going back to the same topic, which I talked about a lot before, I highlight how you need to provide agents with ways to confirm the work.
Finding suitable functions for headless modes, such as regeneration
Another important thing when using agents like these is to use them in tasks that are suitable for headless mode. Complex tasks themselves are not suitable for headless mode and may be better with more input. Also, for tasks that are not clear and where you do not fully understand yourself, you should contact coding agents directly.
However, one task that is well-suited to headless mode is refactoring.
After the release of Claude Fable, I used it, of course, to find problems and refactoring opportunities in my code to make my coding agents more efficient. This can lead to problems such as:
- Misclassification of concerns
- Security risk
- Poor architectural decisions
You can easily do this now using the command below:
look for refactor opportunities in this repository and provide
them to me in a prioritized manner in an HTML file and make a plan on how
to fix it
This will likely have a lot of issues to fix, especially if you're using some of the more powerful coding agents out there, like Claude Fable.
After doing this, you have a complete system. Now you have to change this program using the following command
Take the plan and structure a way for us to implement it.
I'll be using the most powerful coding agent as an orchestrator, and that
coding agent should spin up a bunch of Claude Code headless sessions using
Claude Opus to get each individual task done. Make sure that tasks that
can be done in parallel are spun up in parallel and continue working until
you finish the refactoring completely.
I've been using this for the past few days since Fable became available again with a Claude Code subscription, and I think it's worked pretty well. First of all, I didn't need to search the Claude Code many times myself for all the tasks and refactoring opportunities that the agent gets, and it actually worked very well in production.
Give the agent all the tools they need
Finally, it is also important to give the agent all the tools they need. When you run Claude in Headless Mode, it becomes difficult for the orchestra agent to interact with it, and you want less interaction. The goal of Headless Mode is to provide a one-stop shop command that executes a task and reports when it's done, just like a regular mini-agent, but even more powerful, of course. If you want this done, you need to give the agent all the tools they need; it may need MCP access, it really needs to be allowed to perform actions independently, and so on. So, I urge you to give agents a lot of freedom, of course, while still maintaining control over them to let them do the work independently and report back to their planning agent when they're done.
The conclusion
In this article, I discussed how to orchestrate 100+ agents by using agents as orchestrators to integrate dozens of other agents. I believe this is a very powerful technique that you can use in your coding right away to get the most benefit and be more productive with your programming. I use this technique every day to bring together hundreds of agents to work together and get the job done. I believe that the future of programming will just be that we keep moving forward and adding layers of abstraction, and the techniques I've presented in this article are a way to get one layer off your typical Claude Code interaction.
π Touch
π My Free eBook and Webinar:
π 10x Your Engineering with LLMs (Free 3-Day Email Course)
π Get my free ebook Vision Language Models
π» My webinar on Vision Language Models
π Find me on social media:
π Stack
π LinkedIn
π¦ X / Twitter



