Fleet 1.13:Teams are now shipping 5x more PRs with autonomous pipelines.See what's new →
FleetFleet
Integration

Fleet + Git Worktrees: Parallel Agent Work Without Branch Conflicts

Git worktrees let multiple working trees be checked out from a single repository at the same time. Fleet uses this to give each agent its own isolated working directory on a separate branch, so several agents can develop concurrently without touching each other's files or stashing changes.

When an agent is configured with a worktree, Fleet places it in its own directory and the agent does its work there, opens a PR, and moves on. Worktrees share the main repo's git history and object store, so they are lightweight compared to full clones. This is what makes true parallel development with multiple AI agents practical.

Setup

1

Ensure your repo is a standard git repository (worktrees require git 2.5+)

git --version
2

Give an agent a worktree in its Fleet config, then start it

fleet agent start frontend-developer
3

List active worktrees to see what Fleet has created

git worktree list

What you gain

  • Multiple agents can work on different features in parallel without branch conflicts or stash juggling
  • Each agent has its own working directory, so file-level race conditions between agents are structurally impossible
  • Worktrees reuse the main repo's git history and object store, so they are far lighter than separate clones

Honest limits

  • Fleet does not auto-clean worktrees — after a branch merges you run `git worktree prune` or `git worktree remove` yourself
  • Some git operations and IDE integrations that assume a single working tree can behave unexpectedly with several active worktrees
  • Worktree directories accumulate over time if not pruned, consuming disk space

Frequently asked questions

Does Fleet clean up worktrees when a PR merges?

No. There is no auto-cleanup in the current version. After a branch merges, run `git worktree prune` or `git worktree remove` to reclaim the directory.

How many worktrees can Fleet manage at once?

There is no fixed limit. Fleet creates one per worktree-configured agent; practical limits come down to disk space and how many concurrent agents you run.

Run your first agent fleet

One binary. Five minutes. See every agent, coordinate every handoff, and keep a full audit trail of what your fleet did.