# Run parallel AI coding agents in git worktrees

> Atlas runs multiple coding agents in parallel, each in its own git worktree on its own branch, so concurrent tasks build side by side without overwriting one another.

Atlas can run several AI coding agents at the same time, each in its own git worktree checked out to its own branch. A worktree is a second working copy of your repository that shares the same underlying git history, so each agent gets an isolated set of files to edit while every branch still lands in one repo. Atlas creates and tears these worktrees down for you, boots a separate runtime for each one, and keeps the parallel work from colliding. It runs as a single self-contained binary.

## Key takeaways

- Each parallel agent works in its own git worktree, an isolated checkout on its own branch.
- Atlas creates the worktree, boots a dedicated runtime for it, and removes it when the task is done.
- Because each worktree has its own files, concurrent edits do not overwrite each other.
- Atlas is a single self-contained binary and runs natively on macOS, Linux, and Windows.

## What a git worktree gives a parallel agent

A git worktree is a separate working directory linked to the same repository, so two agents can edit different files on different branches at once. Atlas assigns each parallel task its own worktree instead of forcing every session to share one directory.

When you fan work out to more than one agent, the risk is that two of them write to the same files at the same time. Atlas avoids that by giving each agent its own checkout on a dedicated branch. The worktrees share one git object store, so history stays unified and every branch can be reviewed and merged back through your normal flow, but the files each agent touches are physically separate on disk.

## How Atlas manages worktrees for you

Atlas creates each worktree, checks out a fresh branch, runs your project setup, and boots a dedicated runtime instance scoped to that directory. When the task finishes, it can remove the worktree and clean up the branch.

You do not script the git plumbing yourself. Atlas adds the worktree, populates it, and runs per-project and per-worktree start scripts so the environment is ready. Each worktree gets its own live instance with its own language servers, snapshots, and permission boundary, so the agents run independently rather than contending for one shared session. Removal handles a dirty tree safely and cleans up the branch it created.

## Why parallelism stays safe

Running many agents at once only helps if they do not corrupt each other. Atlas isolates each worktree at the running-instance level and serializes any shared writes so parallel sessions coexist instead of clobbering one another.

Each worktree checkout is its own instance in Atlas, and shared state is guarded by in-process and cross-process locks so two sessions can never half-write the same record. That means you can spread a large change across several agents, or run independent tasks side by side, and trust that each one lands as its own reviewable branch. Each instance also carries its own permission boundary, so approving a command in one session does not widen what another agent is allowed to do.

## FAQ

### Can Atlas run multiple AI agents in parallel?

Yes. Atlas can run several agents at the same time, each in its own git worktree on its own branch, and it manages the worktree lifecycle for you.

### What is a git worktree?

A git worktree is a second working copy of your repository that shares the same git history. It lets an agent edit an isolated set of files on its own branch while still landing in one repo.

### Do parallel agents overwrite each other's changes?

No. Each agent works in a separate worktree with its own files, and Atlas serializes any shared writes with locks, so concurrent edits do not clobber one another.

### Does Atlas clean up worktrees automatically?

Yes. Atlas creates each worktree and can remove it and delete the branch it created when the task is finished, handling a dirty working tree safely.

---

Canonical HTML: https://runatlas.sh/resources/features/parallel-agents-git-worktrees
Source of truth: aeo_pages row `/resources/features/parallel-agents-git-worktrees` (segment: Platform) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
