Leveraging Git worktrees to sandbox AI agents is a masterclass in turning chaotic parallel coding into a structured, conflict-free pipeline. It’s the essential architectural upgrade for developers looking to scale Claude Code beyond simple, single-task experiments.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
The best way to run multiple Claude CodesAdded:
Let's talk about managing multiple Claude codes. So, if you've been using Claude code for a while, you might recognize it's a super powerful tool and it's pretty amazing, but managing multiple Claude codes can get really tricky really fast. What am I talking about? Well, let's go through a sample workflow here. Say I, you know, start my day off, I open up my terminal, I already have, you know, four different sessions running here. I can't really remember what directories they were in, what they're making changes to. I sit down and I think, okay, you know, today I'm going to get started adding a new feature to my social media tools. I use some social media automations. So, I'm going to create a, you know, thumbnail generator.
I spelled thumbnail wrong. We'll enter like, you know, plan mode.
Claude's going to help me work through that. Awesome. I see Slack. I remember, oh, my boss just told me I need to start working on this other thing. I kind of like, you know, bring in another window and I sit down to do work in a different directory. And now I have, right, five agents across two windows running in different directories. I don't really remember what's going on, what branch they're working in, what code they're editing. And this is what the problem is, really, right? Because there are three things that are wrong. First, I'm having issues running Claude across projects. Second, I'm having issue running Claude inside the same project with multiple agents. They can make, you know, conflicting changes. Maybe these agents need isolated changes or isolated workspaces. And then third, which I hadn't even mentioned, what if I bring Codex into the mix? Because Codex is a great tool as well. So, these are the three problems I've seen with managing multiple Claude codes. So, what do we do about it? Well, in front of me I have Conductor and I'm going to walk through this step by step because this can be a bit overwhelming. What Conductor is is a place to manage agents both running in parallel and across your projects. So, on the left here, we can see that social tools repo that I talked about, right?
And inside that social tools repo are a bunch of different workspaces. This is my project. When I click create a new workspace, this is kind of akin to typing in Claude in the terminal, but not really. Because what's happening here is that Conductor's creating an entirely new folder for me to develop in. This folder is linked to the same Git repository and I'm actually installing all my packages here into this folder. So, basically it's like a completely fresh environment. Within that folder, I then can come in and I can fire up Claude Opus. I can also run GPT-55.
Maybe I turn off plan mode and I say, make the red button blue.
Cool.
So, now I have a change working.
I could also make a new agent in the same workspace and reference that chat session. So, now I'm able to share context across agents within the same session.
That's not all, right? Because what you can see is that I have multiple branches here. So, here's a really big feature that I was working on, adding a YouTube thumbnail pattern builder.
I have that running here in this folder.
I can open that up and I can take a look and I can check out this pattern builder that I'm creating in my repository.
And this is a really big feature.
If I was developing this otherwise, I might have to check out a new branch and I wouldn't be able to really switch branches for a long time because I'd be so engrossed on this feature. Or maybe, you know, I'd have to switch branches, I kind of lose the context of having this thing working in the background. I have to check them out my branch again, remember where I'm at. So, we have our agent working here on my thumbnail builder. At the same time, I'm also making some improvements to the side nav.
Make the spacing better in the side nav and label each section. Because this is a completely different folder, I can also run this project. And if I open up this project, you'll notice this now says navigation in all caps and there's a bit more spacing on the sidebar.
What's not there is my thumbnail generator because that's in a different branch. So, what I'm doing is I'm developing features in parallel in isolated workspaces. The nice thing about Conductor again is that I said, hey, create a PR. It created the PR for me. I can change the status of the PR from draft to ready for review. And because this is a private repo, it's a personal project, I can merge this in and Conductor handles that all from end to end. So, without having to leave the project, what you'll notice is that now I have multiple features running in parallel. We can stop this and archive that workflow and I'm able to manage them all simultaneously.
Again, there's another feature I'm working on here, which is that I want a tool for selecting frames from a video and downloading them individually as PNGs at full resolution.
That's great. So, I asked Codex for this plan. I'm looking at this plan and I'm thinking, is this the right thing to do?
Well, what I could do here is pop over, fire up another plan, but with Opus. So, now I can compare model outputs in the same workspace. I can select a plan intelligently. And while I'm developing my social tools, I can also work on some of like my programming and fitness stuff because I'm building an app for that as well. Here I have um a PR to make the notes section for each entry a little bit larger. I did this yesterday.
I just forgot to merge it. I can merge that in. I know that update goes through. So, I'm throwing a lot at you, but what I'm showing you is a workflow that solves these problems, right? It's for managing agents within repositories and isolated environments so they don't conflict. It's for managing agents across repositories, giving us a high-level view of all the things that we're working on simultaneously. And third, it allows us to use Codex and Claude code in parallel and share context between those sessions. One of the nice things about Conductor is that it just uses our existing Claude code and Codex subscriptions. So, if you're already paying Open AI or Claude, you don't you don't have to pay Conductor, right? So, I found this to be a really powerful workflow. I think at a meta level, right, this Git work tree approach is a good one. It's not really the tool here.
It's just the fact that creating isolated environments and running agents in those environments is really useful.
The tool just gives you a GUI, a graphical user interface for managing that across multiple agents. So, we can keep this one short, we can keep it sweet. I'll throw a link in the description to Conductor, but this is the best way that I've found for running parallel Claude codes.
But, I'm Matt. Until next time. Peace.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











