Fleet: Parallel AI Agent Workstreams with Git Worktrees
I needed a way to run multiple Claude Code agents on the same repo at the same time and keep it manageable. Fleet is what came out of that.
# why I built this
My workflow at Unbuffered leans heavily on Claude Code. I use it for feature work, refactoring, bug fixes, code review — basically everything. And once you get used to that speed, you start wanting to parallelize. Fix the navbar while the auth feature is still cooking. Run a refactor in the background while you review a PR in the foreground.
The problem is git. One repo, one checkout, one branch at a time. I needed a way to work on the same repo at the same time — multiple agents, multiple branches, no conflicts. You can stash and switch, but with agents writing code simultaneously, that falls apart fast. Lost context, broken state, constant collisions.
Git worktrees are the right primitive — each worktree is a full checkout on its own branch, sharing the same .git directory. But nobody wants to manage worktrees by hand. Creating them, remembering where they live, cleaning them up, keeping track of which agent is on which branch — all that overhead kills the speed advantage you were going for in the first place.
Then I found cmux — a terminal workspace manager built on libghostty. It gives you named workspaces, split panes, sidebar status, and a CLI to control it all. That was the ah-ha moment: if each worktree gets its own cmux workspace, you can spin up agents in parallel and actually manage them. Worktrees handle the git isolation, cmux handles the terminal isolation.
I wanted one command that gives an agent its own workspace and gets out of the way.
So I wrote fleet.
# what it looks like
Fleet is a single Bash script. No dependencies, no build step. You give it a branch name and a prompt, and it handles the rest — creates the worktree, runs your setup hook, and launches Claude:
fleet new auth-feature -p "Add OAuth2 login with Google provider"
That's it. The agent is working in an isolated directory on its own branch. You can spin up more without waiting:
fleet new fix-navbar -p "Fix responsive navbar overflow on mobile"
fleet new api-v2 -p "Add versioned API routes"
Three agents, three branches, three working directories, zero conflicts. When they're done:
fleet merge auth-feature # opens a PR
fleet rm fix-navbar # cleans up worktree + branch
# the multiplier: cmux.dev
Fleet works fine without cmux — it'll cd into the worktree and run Claude inline. But with cmux, each worktree gets its own workspace tab instead of taking over your terminal. You launch agents and your shell stays put. Switch between workspaces, monitor sidebar status, get notifications when an agent finishes. It turns "run three agents in parallel" from a concept into something you actually do ten times a day.
fleet focus auth-feature # jump to that workspace
fleet ls --status # see what every agent is doing
# agent teams
Some tasks are too big for one agent. A major refactor benefits from an explorer reading the codebase, an architect planning the approach, and a reviewer catching issues — all working in the same worktree, in split panes.
fleet new big-refactor --team
The default team has three roles, but you can configure them per-project in .fleet/team.json or add roles on the fly. You can also talk to individual agents while they work:
fleet send big-refactor --role architect "Focus on the database layer first"
I use this for anything that touches more than a handful of files. The coordination between agents isn't perfect, but having multiple perspectives on the same codebase catches things a single agent misses.
# the boring parts that matter
The details that make fleet practical day-to-day:
Setup hooks. Most repos need something after a fresh checkout — npm install, symlink .env, run codegen. Fleet's .fleet/setup script runs automatically so every worktree starts ready to go. Commit it to the repo and forget about it.
Multi-repo tracking. Fleet keeps state across repositories. fleet ls --all shows every active worktree across all your projects. Existing worktrees can be adopted with fleet register.
Claude Code skills. Fleet installs three slash commands: /fleet for status, /dispatch for spawning parallel workstreams from inside an agent session, and /fleet-cleanup for pruning stale worktrees.
# try it
curl -fsSL https://gitlab.com/nighthawk-oss/fleet/-/raw/main/install.sh | sh
That installs fleet to ~/.local/bin, adds the shell wrapper, and sets up the Claude Code skills. Then:
source ~/.zshrc
cd your-repo
fleet new my-feature -p "Build the thing"
Fleet is open source on GitLab. v1.2.0 is the current release.