Sitemap
Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Member-only story

Running Multiple AI Agents at Once Using Git Worktrees

Or how to get more productive with long running agents

4 min readJan 27, 2026

--

Press enter or click to view image in full size
Cover image for: Running Multiple AI Agents at Once Using Git Worktrees

The Agent is the bottleneck

The Problem

Running a local agent effectively “locks” your workspace. While an agent is busy with code generation or long-running evaluations, you are tied to that specific branch. Switching branches to handle a separate task risks breaking the agent’s execution or creating a mess of uncommitted changes.

Cloning the repository into multiple separate folders is a common workaround, but it is inefficient. It duplicates the entire .git history, consumes excessive disk space, and makes managing synchronized updates between copies a logistical headache.

The Solution

Git Worktrees¹. Instead of cloning, worktrees allow you to attach multiple independent working directories to a single repository. Think of them as “parallel universes”: each agent gets its own folder and branch, enabling five agents to operate on five different tasks simultaneously from one source.

Once a task is complete, you simply merge the worktree branch into main. Deleting the worktree folder leaves no trace, no redundant clones, no configuration drift, and no idle time.

--

--

Bootcamp
Bootcamp

Published in Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Lukas Oppermann
Lukas Oppermann

Written by Lukas Oppermann

Product designer with a love for complex problems & data. I post about Figma, design tokens, design systems & design related topics. https://lukasoppermann.com