Steven Gonsalvez

Software Engineer

← Back to Tools & Tips
Free|

Claude Squad: Run Multiple AI Agents in Parallel Without the Mess

Terminal app that manages multiple Claude Code, Codex, and Aider instances simultaneously in isolated git worktrees. Parallel agents, zero merge conflicts. Written in Go.

Visit tool →

The Sequential Agent Bottleneck

So here's the thing that was doing my head in. I'd have Claude Code working on a feature in one file, and I'd want to kick off a second task at the same time. Bug fix in a different module. Test coverage for something else entirely. Independent work, no reason it can't run in parallel.

But you can't just open two Claude Code sessions in the same repo. They'll step on each other's files. Git gets confused. The agents start reading each other's half-finished changes and making decisions based on code that's mid-refactor. It's like having two chefs in a kitchen where they keep grabbing the same chopping board.

Claude Squad by smtg-ai fixes this with a beautifully simple idea: give each agent its own git worktree.

How It Works

Claude Squad is a Go-based terminal app that manages multiple AI coding agent instances simultaneously. When you spin up a new agent, it creates an isolated git worktree for that agent. Same repo, different working directory, own branch. The agents can't see each other's changes. No conflicts. No confusion.

The TUI (terminal user interface) shows you all your running agents at once. Each one gets a pane showing what it's doing, what files it's touching, and where it's at. You can switch between agents, review their work, and merge when you're happy.

It doesn't just work with Claude Code either. Codex, OpenCode, Aider, Gemini. Whatever terminal-based AI coding agent you're running, Claude Squad can manage it. 6,800 stars and 474 forks, which for a Go CLI tool is a proper showing.

What Running Five Agents at Once Actually Feels Like

I'll be straight with you: it feels like cheating. In a good way.

You kick off agent one on a new feature. While it's researching the codebase and writing its plan, you kick off agent two on a bug fix. Agent three starts writing tests for last week's PR. Agent four does a refactor you've been putting off. Agent five tidies up the documentation.

Each one is working independently. Own branch. Own worktree. You pop back and forth checking progress. When an agent finishes, you review its diff, merge if it looks good, and move on. What used to be a day of sequential work becomes an hour of parallel supervision.

The key insight is that most coding tasks have long stretches where the agent is working and you're just watching. Waiting for it to finish its research phase. Waiting for it to write the implementation. Waiting for tests to pass. Claude Squad turns that dead time into productive time because you've got other agents running during those waits.

The Git Worktree Magic

This is the bit that makes it work and why I rate it so highly.

Git worktrees are a native Git feature that most people never use. They let you check out multiple branches of the same repo simultaneously, each in a separate directory, all sharing the same .git storage. No cloning the repo five times. No managing five copies. Just five checkouts of the same repo.

Claude Squad automates the creation, naming, and cleanup of these worktrees. When you spin up an agent, it gets a worktree. When the agent finishes and you merge (or discard), the worktree gets cleaned up. You never touch git worktree commands yourself.

This matters because the alternative approaches are all worse. Running agents on different git clones wastes disk space and makes merging painful. Running agents on the same checkout causes file conflicts. Running agents in Docker containers adds latency and complexity. Worktrees hit the sweet spot: proper isolation with zero overhead.

📚 Geek Corner
Worktrees vs worktrees with tmux: Claude Squad uses tmux under the hood for session persistence, which means your agents survive terminal disconnects. Close your laptop, open it tomorrow, your agents are still there. This is the same pattern we use in agents-in-a-box for session management. The combination of git worktrees for code isolation and tmux for process persistence turns out to be the two-ingredient recipe for parallel agent management. Everything else people try (Docker, VMs, containers, branch switching) is solving a problem that worktrees + tmux already solved at the filesystem level. The AGPL license is worth noting if you're building commercial tools on top of it, though for personal use it's not a concern.

When to Use Claude Squad vs Heavier Orchestrators

If you need five agents working on truly independent tasks in the same repo, Claude Squad is the right tool. Lightweight, fast, no configuration ceremony.

If you need agents that coordinate with each other, share memory, pass work between them, or follow a structured multi-phase workflow, you want something heavier like Ruflo (formerly Claude Flow). That's an orchestration platform. Claude Squad is a parallelisation tool. Different jobs.

My personal workflow: Claude Squad for the daily grind of multiple independent tasks. Swarms for the big coordinated efforts. Both tools in the toolkit, different occasions to reach for each one.

Getting Started

go install github.com/smtg-ai/claude-squad@latest

Or grab the binary from the GitHub releases page. Fire it up, spin up a couple of agents, and wonder why you ever waited for one agent to finish before starting the next one.

Share𝕏in

Comments & Reactions