Common information highlights how multitasking must be averted as a lot as potential as a result of it removes you from focus. Nevertheless, with the rise of coding brokers, parallel work has turn out to be a requirement to be environment friendly. Contemplating coding brokers can run for an extended time period, you don’t need to spend time ready on them to complete. As an alternative, you need to hearth off an agent, and whereas that agent is working, you need to begin one other job.
Nevertheless, beginning off duties in parallel isn’t easy. There are quite a few issues it’s essential make, comparable 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 potential?
- How do you retain an outline of all your brokers which might be working?
I’ll cowl all of those factors in at present’s article with specifics on how I cope with these issues and the answer I apply.
Why run brokers in parallel
As with lots of the opposite articles I’ve written, the primary purpose for the strategies I describe within the article is saving time and being extra environment friendly as an engineer. If you wish to get essentially the most out of coding brokers and the unimaginable LLM growth we’ve seen in the previous few years, it’s essential parallelize your work.
To grasp why, let’s think about the alternative instance. Let’s think about solely working sequentially, such as you usually did when programming earlier than LLMs grew to become accessible. Sequential programming with coding brokers would look one thing like:
- Discover the duty you need 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 differ lots. Generally describing the duty to an agent and making a plan takes essentially the most period of time, however in my expertise, the third step is commonly a time-consuming step, particularly for bigger implementations comparable to implementing a brand new characteristic or fixing a posh bug.
Now, to turn out to be extra environment friendly, what we need to do is to get rid of bottlenecks. The third step is a bottleneck we are able to simply decrease or get rid of. Steps one and two are very troublesome to be extra environment friendly at. You might want to do that sequentially and spend time on them. Step 4 is certainly one thing you can also make extra environment friendly, as I’ve described in different articles, comparable to my article on Making Claude Higher at One-Shotting Implementations. I’ll thus deal with step 3 on this article and easy methods to make it extra environment friendly.
run brokers in parallel
The straightforward resolution to creating step 3 extra environment friendly is to run brokers in parallel. This sounds easy in principle, however it’s really tougher to do successfully in observe. The explanation for that is that working duties in parallel presents quite a few challenges.
One problem it’s important to cope with is brokers writing code over one another. You don’t need brokers competing for modifying a particular file or testing their very own implementation. So that is one downside it’s important to cope with. One other downside it’s important to cope with is the truth that it’s important to do context switching. So if you run duties in parallel, you naturally must do context switching between the completely different duties. One side of context switching is that it’s important to first describe one job and easy methods to clear up it, then describe one other job and easy methods to clear up it. One other side of context switching is when the agent asks for suggestions, comparable to asking you questions on an implementation or asking you to check an implementation. So, minimizing context switching is one other side that I’ll describe within the latter sections.
Operating a number of brokers in the identical repository utilizing worktrees
The primary matter 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’ll be able to merely instruct your agent to make use of a worktree, which is a git characteristic that primarily copies your complete repository. So completely different brokers can work in fully completely different repositories. After an agent finishes its implementation, it may be merged into the primary department of the primary repository, and on this means, you’ll be able to have a number of brokers working in the identical repository with out conflicts.
Nevertheless, generally there may very well be less complicated methods to attain 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 overlook to truly take a look at a brand new worktree after which begin work in the primary repository. Then, when a number of brokers did the identical factor, I began having conflicts. Fortunately, Claude Code applied a –worktree command that you need to use when spinning up cloud code, comparable to under
claude --worktreeIn case you use this command inside a GitHub repository, Claude will routinely take a look at to a brand new worktree given the prevailing repository and can retailer all of the worktrees below a hidden Claude folder. That is extremely helpful for 2 most important causes:
- You assure that you just’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 most important folder. This considerably reduces the quantity of noise in your folder construction, making it simpler to navigate your folder construction manually if it’s essential do this.
In case you’re utilizing one other coding agent, you’ll be able to work out how they’ve arrange worktrees, as worktrees have gotten increasingly of an anticipated characteristic for any coding agent program, comparable to an IDE like Cursor or a CLI like Claude Code.
Decrease context switching
Facet quantity two that it’s essential take into consideration when working coding brokers in parallel is that it’s essential 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 throughout the job, comparable to when the agent asks you questions, or it finishes its implementation and asks you to check it.
There’s no easy resolution to only get rid of contact switching, as parallel work inherently implies contact switching. Nevertheless, there are some things I take note to attenuate my contact switching.
The very first thing I take note is to all the time end my present job earlier than transferring to a different job. This appears very apparent after I describe it; nonetheless, I need 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 will have two duties, A and B, that it’s essential do. Job A requires a five-minute interplay from the person, whereas job 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 job A, and your psychological context is at the moment on job A.
On this scenario, it is rather tempting to modify from job A to job B, do the two-minute setup on job B so the agent can run whilst you end job A. Nevertheless, I urge you to keep away from this as a lot as potential and relatively attempt to end the work you’re at the moment doing after which transfer on to the following job in line, regardless that this may not look like the optimum method at first look.
The explanation for that is which you can, after all, see what number of minutes it takes to finish every job. Job A takes 5 minutes, job B takes 2 minutes of interplay after which 10 minutes to run. Nevertheless, what you don’t see is the hidden value of context switching, and I’d argue that switching from job A to B after which switching again to job A will value you extra time than merely finishing job A after which finishing job B.
The second means I decrease contact switching is to attenuate distractions on my pc. There are quite a few methods to do that, however generally, 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 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 the moment doing.
Moreover, I attempt to preserve 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 break up the tab. I’ll talk about my terminal setup in additional element within the subsequent part.
Maintain an outline of all your brokers
Once you run a number of brokers, it’s extremely necessary to maintain an outline of all of your brokers. Nevertheless, this doesn’t essentially come naturally, and it’s essential make lively decisions to make it as straightforward as potential to achieve an outline.
That is the place my terminal setup is available in clutch. When I’ve 5 to 10 brokers working in parallel, it could possibly simply be very complicated which agent is doing what and what it’s essential work together with.
For my terminal setup, I exploit Warp. I believe 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 exploit 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, however 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 break up the tabs utilizing CMD + D on Mac. So I get a number of break up subtabs for every of my most important tabs. This helps me preserve solely a single most important tab for every repository, whereas additionally working a number of brokers throughout the repository.
Moreover, I prefer to rename my tabs inside Warp to the repository title in order that it’s straightforward to navigate to the proper tab. And use CMD 1/2/3 and so forth to shortly navigate between the completely different tabs. And I’ve notifications from Warp each time an agent wants interplay.
I’d additionally like to notice that there are numerous different setups you need to use on your coding brokers. To begin with, you need to use a unique terminal, which is able to doubtless work fairly nicely additionally, although my desire stays on heat. One other good different I do know of is to make use of the Claude software or an software referred to as Conductor, which makes it straightforward to provide an outline of your completely different repositories and coding brokers that you’re working.
All in all, nonetheless, your setup comes all the way down to what your desire is. In case you discover a setup that works nicely for you, I extremely suggest 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 purpose you need to do that is to easily be extra environment friendly as an engineer. In case you run duties in parallel, you’ll be far more practical than an analogous engineer who runs duties sequentially. Nevertheless, working duties in parallel isn’t easy, and it’s essential use particular strategies 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 turn out 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 whilst 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
🐦 X / Twitter



