# Worktrunk: Git Worktrees Made Simple for Parallel AI Agents

> Source: <https://dev.to/arshtechpro/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents-1106>
> Published: 2026-09-19 21:08:11+00:00

AI coding agents like Claude Code and Codex can now work on longer tasks without supervision. That means you can realistically run several of them at once, each on a different feature or bug.

The catch: if they all work in the same folder, they overwrite each other's changes. Git has a built-in answer for this called **worktrees**. A worktree is a separate working directory attached to the same repository, so each branch can live in its own folder at the same time.

The problem is that git's worktree commands are clunky. Just starting a new one looks like this:

```
git worktree add -b feat ../repo.feat
cd ../repo.feat
```

You type the branch name three times. Cleaning up afterward takes another three commands. Do this ten times a day and it gets old fast.

[Worktrunk](https://github.com/max-sixty/worktrunk) is a command-line tool, written in Rust, that makes worktrees as easy to use as regular branches. You refer to everything by branch name, and Worktrunk works out the folder paths for you.

It's open source (MIT or Apache-2.0), was released at the start of 2026, and already has over 5k stars on GitHub.

Here's how Worktrunk compares with plain git:

| Task | Worktrunk | Plain git | 
|---|---|---|
| Switch to a worktree | `wt switch feat` | `cd ../repo.feat` | 
| Create and start an agent | `wt switch -c -x claude feat` | `git worktree add -b feat ../repo.feat && cd ../repo.feat && claude` | 
| Clean up | `wt remove` | `cd ../repo && git worktree remove ../repo.feat && git branch -d feat` | 
| List with status | `wt list` | `git worktree list` (paths only) | 

Four commands cover most of what you'll do day to day.

Install with Homebrew (macOS and Linux):

```
brew install worktrunk && wt config shell install
```

Or with Cargo:

```
cargo install worktrunk && wt config shell install
```

The `wt config shell install` step matters. It adds shell integration so `wt` can actually change your current directory.

Create a worktree for a new feature:

```
wt switch --create feature-auth
```

This creates the branch and the worktree, then moves you into it. Check all your worktrees and their status with:

```
wt list
```

When you're done, you can open a PR as usual and run `wt remove` after it merges. Or merge locally with one command:

```
wt merge main
```

That commits your changes, rebases onto main, merges, and removes the worktree and branch.

This is where Worktrunk shines. Start three agents on three tasks, each in its own isolated worktree:

```
wt switch -x claude -c feature-a -- 'Add user authentication'
wt switch -x claude -c feature-b -- 'Fix the pagination bug'
wt switch -x claude -c feature-c -- 'Write tests for the API'
```

The `-x` flag runs a command after switching, and everything after `--` is passed to that command. No agent touches another agent's files.

Beyond the basics, Worktrunk includes:

`node_modules/` or `target/` instead of starting cold.`wt switch pr:123`.
Yes, if you:

A few honest caveats. It's a young project, so expect frequent releases and occasional changes. Every worktree is a full copy of your working files, so large repos use more disk space (the cache-copying feature helps, but doesn't remove this). On Windows, `wt` clashes with the Windows Terminal command, so it installs as `git-wt` instead unless you disable that alias. And if you only ever work on one branch at a time, plain `git switch` is all you need.

If parallel agents are part of your workflow, Worktrunk removes most of the friction of worktrees. Install it, spin up two worktrees, and you'll know within ten minutes whether it sticks.
