Normal information highlights how multitasking ought to be prevented as a lot as attainable as a result of it removes you from focus. Nonetheless, with the rise of coding brokers, parallel work has grow to be a requirement to be environment friendly. Contemplating coding brokers can run for an extended time frame, you don’t wish to spend time ready on them to complete. As an alternative, you wish to hearth off an agent, and whereas that agent is working, you wish to begin one other process.
Nonetheless, beginning off duties in parallel isn’t easy. There are quite a few concerns you should make, corresponding to
- How do you run a number of coding brokers in the identical repository?
- How do you continue to decrease context switching as a lot as attainable?
- How do you retain an outline of your entire brokers which are operating?
I’ll cowl all of those factors in at this time’s article with specifics on how I take care of these issues and the answer I apply.

Why run brokers in parallel
As with a number of the opposite articles I’ve written, the principle cause for the methods I describe within the article is saving time and being extra environment friendly as an engineer. If you wish to get probably the most out of coding brokers and the unbelievable LLM improvement we’ve seen in the previous couple of years, you should parallelize your work.
To know why, let’s think about the other instance. Let’s think about solely working sequentially, such as you sometimes did when programming earlier than LLMs turned accessible. Sequential programming with coding brokers would look one thing like:
- Discover the duty you wish to do
- Describe it to an agent and make a plan
- Begin the agent and let it run. Wait till it finishes or asks you for one thing
- Check implementation and iterate
How lengthy every of those duties is will range quite a bit. Generally describing the duty to an agent and making a plan takes probably the most period of time, however in my expertise, the third step is usually a time-consuming step, particularly for bigger implementations corresponding to implementing a brand new function or fixing a posh bug.
Now, to grow to be extra environment friendly, what we wish to do is to remove bottlenecks. The third step is a bottleneck we are able to simply decrease or remove. Steps one and two are very troublesome to be extra environment friendly at. It’s good to do that sequentially and spend time on them. Step 4 is certainly one thing you may make extra environment friendly, as I’ve described in different articles, corresponding to my article on Making Claude Higher at One-Shotting Implementations. I’ll thus give attention to step 3 on this article and easy methods to make it extra environment friendly.
Learn how to run brokers in parallel
The straightforward resolution to creating step 3 extra environment friendly is to run brokers in parallel. This sounds easy in idea, nevertheless it’s truly tougher to do successfully in apply. The rationale for that is that operating duties in parallel presents plenty of challenges.
One problem it’s a must to take care of is brokers writing code over one another. You don’t need brokers competing for enhancing a particular file or testing their very own implementation. So that is one downside it’s a must to take care of. One other downside it’s a must to take care of is the truth that it’s a must to do context switching. So if you run duties in parallel, you naturally must do context switching between the totally different duties. One facet of context switching is that it’s a must to first describe one process and easy methods to remedy it, then describe one other process and easy methods to remedy it. One other facet of context switching is when the agent asks for suggestions, corresponding to asking you questions on an implementation or asking you to check an implementation. So, minimizing context switching is one other facet that I’ll describe within the latter sections.
Operating a number of brokers in the identical repository utilizing worktrees
The primary subject I’ll cowl is easy methods to run a number of brokers in the identical repository. The straightforward reply to how to do that is to make use of worktrees.
You possibly can merely instruct your agent to make use of a worktree, which is a git function that basically copies your complete repository. So totally different brokers can work in fully totally different repositories. After an agent finishes its implementation, it may be merged into the principle department of the principle repository, and on this manner, you possibly can have a number of brokers working in the identical repository with out conflicts.
Nonetheless, generally there may very well be easier methods to realize the worktree setup. From my private expertise, I had points when utilizing Claude Code and asking it to take a look at a worktree. Claude would usually neglect to really take a look at a brand new worktree after which begin work in the principle repository. Then, when a number of brokers did the identical factor, I began having conflicts. Fortunately, Claude Code carried out a –worktree command that you need to use when spinning up cloud code, corresponding to under
claude --worktree
When you use this command inside a GitHub repository, Claude will robotically take a look at to a brand new worktree given the prevailing repository and can retailer all of the worktrees underneath a hidden Claude folder. That is extremely helpful for 2 principal causes:
- You assure that you simply’re all the time utilizing a worktree and that your brokers won’t intrude with one another.
- The worktrees are saved in a hidden Claude folder and never in your principal folder. This considerably reduces the quantity of noise in your folder construction, making it simpler to navigate your folder construction manually if you should do this.
When you’re utilizing one other coding agent, you possibly can work out how they’ve arrange worktrees, as worktrees have gotten increasingly more of an anticipated function for any coding agent program, corresponding to an IDE like Cursor or a CLI like Claude Code.
Reduce context switching
Facet quantity two that you should take into consideration when operating coding brokers in parallel is that you should decrease context switching. I discussed earlier how this comes primarily in two elements. One, when beginning after duties, and two, when interacting with the agent in the course of the process, corresponding to when the agent asks you questions, or it finishes its implementation and asks you to check it.
There’s no easy resolution to simply remove contact switching, as parallel work inherently implies contact switching. Nonetheless, there are some things I have in mind to attenuate my contact switching.
The very first thing I have in mind is to all the time end my present process earlier than shifting to a different process. This appears very apparent once I describe it; nonetheless, I wish to present a particular instance. You could find the instance described within the textual content under, however I’ll additionally present the picture to provide you a better understanding of the idea proper under.

Let’s say you’ve gotten two duties, A and B, that you should do. Process A requires a five-minute interplay from the person, whereas process B requires a two-minute interplay by the person, and after that interplay, the agent will run for ten minutes to finish the duty. Additionally, you already began process A, and your psychological context is at present on process A.
On this state of affairs, it is extremely tempting to modify from process A to process B, do the two-minute setup on process B so the agent can run when you end process A. Nonetheless, I urge you to keep away from this as a lot as attainable and slightly attempt to end the work you’re at present doing after which transfer on to the following process in line, though this won’t look like the optimum method at first look.
The rationale for that is which you can, after all, see what number of minutes it takes to finish every process. Process A takes 5 minutes, process B takes 2 minutes of interplay after which 10 minutes to run. Nonetheless, what you don’t see is the hidden price of context switching, and I’d argue that switching from process A to B after which switching again to process A will price you extra time than merely finishing process A after which finishing process B.
The second manner I decrease contact switching is to attenuate distractions on my pc. There are quite a few methods to do that, however normally, I urge you to disable all notifications. I, for instance, disabled the Slack notifications on my pc and likewise the quantity showing on the Slack software that informs you if in case you have a message ready for you. I discover this very distracting and removes my focus and context from the work that I’m at present doing.
Moreover, I attempt to maintain one tab in my terminal setup per repository I’m engaged on. And if I’m engaged on a number of duties inside a single repository, I cut up the tab. I’ll talk about my terminal setup in additional element within the subsequent part.
Maintain an outline of your entire brokers
If you run a number of brokers, it’s extremely vital to maintain an outline of all of your brokers. Nonetheless, this doesn’t essentially come naturally, and you should make energetic selections to make it as straightforward as attainable to achieve an outline.
That is the place my terminal setup is available in clutch. When I’ve 5 to 10 brokers operating in parallel, it may well simply be very complicated which agent is doing what and what you should work together with.
For my terminal setup, I take advantage of Warp. I feel Warp is an efficient AI terminal that has good autocomplete and that I can simply work together with to make use of Claude Code successfully. I take advantage of one tab in Warp per repository I’m working in. This may very well be a coding repository, for instance, containing the frontend or software, nevertheless it may be a gross sales repository the place I’ll do all the gross sales work.
Then, if I run a number of brokers inside one repository, which I usually do, I merely cut up the tabs utilizing CMD + D on Mac. So I get a number of cut up subtabs for every of my principal tabs. This helps me maintain solely a single principal tab for every repository, whereas additionally operating a number of brokers inside the repository.
Moreover, I prefer to rename my tabs inside Warp to the repository identify in order that it’s straightforward to navigate to the right tab. And use CMD 1/2/3 and so forth to shortly navigate between the totally different tabs. And I’ve notifications from Warp every time an agent wants interplay.
I’d additionally like to notice that there are various different setups you need to use on your coding brokers. To start with, you need to use a distinct terminal, which is able to probably work fairly properly additionally, although my choice stays on heat. One other good different I do know of is to make use of the Claude software or an software known as Conductor, which makes it straightforward to provide an outline of your totally different repositories and coding brokers that you’re operating.
All in all, nonetheless, your setup comes right down to what your choice is. When you discover a setup that works properly for you, I extremely advocate utilizing that setup and easily sticking with it.
Conclusion
On this article, I’ve mentioned easy methods to effectively parallelize your programming duties. The principle cause it is best to do that is to easily be extra environment friendly as an engineer. When you run duties in parallel, you’ll be far more practical than the same engineer who runs duties sequentially. Nonetheless, operating duties in parallel isn’t easy, and you should use particular methods to maintain an outline of all of your brokers, decrease context switching, and guarantee your brokers aren’t colliding with one another. I consider the idea I’ve described on this article is the way forward for work with AI. People will grow to be orchestrators of AI brokers, and also you want to have the ability to effectively parallelize your work and hearth off brokers to finish particular duties when you solely work together with the brokers on demand.
👉 My free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day E 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















