TL;DR
Worktrunk (max-sixty/worktrunk) is a command-line tool, written in Rust by Maximilian Roos, that wraps git worktree so that creating, switching between, merging and deleting worktrees takes one short command each. Its stated purpose is running several AI coding agents (Claude Code, Codex, OpenCode, Gemini CLI and others) at the same time, each in its own working directory, without them overwriting each other’s changes.
Facts as of November 4, 2026:
- 10,758 GitHub stars and 396 forks. The repo was created on October 17, 2025, and the first public release post went up in late November 2025. It is on GitHub’s weekly trending list this week.
- 42 open issues (issues only; there are 30 more open pull requests). Commits land almost daily.
- License: MIT or Apache-2.0, your choice. Free, with no paid tier or account.
- Latest release: v0.81.0, published October 20, 2026. Releases arrive every one to three weeks, and v0.81.0 has several breaking changes.
- Installs with Homebrew, Cargo, Winget, pacman, conda-forge or a shell installer. The binary is
wt(andgit-wt).
Our verdict: If you run more than one coding agent at a time on the same repository, Worktrunk is the most polished way to manage the worktrees they need. Our container test passed all six steps in 11.9 seconds: the official installer, creating a worktree, listing it, merging a branch back and cleaning up. The cautions: frequent breaking changes in a pre-1.0 tool, shell integration you must install to get the main convenience (automatic cd), and a lot of surface area (hooks, templates, aliases, plugins) for what starts as a small wrapper.
Quick Reference
| Field | Value |
|---|---|
| What it is | CLI wrapper around git worktree for parallel branches and AI agents |
| Install | brew install worktrunk && wt config shell install (or cargo install worktrunk) |
| Core commands | wt switch, wt list, wt merge, wt remove |
| Agent plugins | Claude Code, Codex, OpenCode, Pi, oh-my-pi, Gemini CLI |
| Platforms | macOS, Linux, Windows (as git-wt via Winget) |
| Language | Rust (edition 2024) |
| License | MIT OR Apache-2.0 |
| Docs | worktrunk.dev |
What Worktrunk Actually Is
Git worktrees give one repository several checked-out branches, each in its own directory, sharing a single .git object store. They are the standard way to let three agents work on three features at once. The problem is the interface: the README points out that starting one means typing the branch name three times (git worktree add -b feat ../repo.feat, then cd ../repo.feat), and cleanup takes three more commands.
Worktrunk’s idea is to address worktrees by branch name and compute their paths from a template. By default, branch feat in ~/code/repo lives at ~/code/repo.feat. Then it wraps the lifecycle:
| Task | Worktrunk | Plain git |
|---|---|---|
| Switch | wt switch feat | cd ../repo.feat |
| Create and start Claude | 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) |
Everything else (hooks, LLM commit messages, the merge pipeline, the interactive picker, CI status, build-cache sharing) is built on top of these four.
Getting Started
On macOS or Linux with Homebrew:
brew install worktrunk && wt config shell install
The second command installs a shell function so wt switch can cd you into the new worktree (bash, zsh, fish, Nushell and PowerShell). Without it, Worktrunk still works but cannot change directory, as our test showed.
Create a worktree for a feature:
wt switch --create feature-auth
# ✓ Created branch feature-auth from main and worktree @ ~/repo.feature-auth
Start three agents in parallel, each with its own task. The -x flag runs a command after switching, and anything after -- is passed to it:
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'
Check where everything stands:
wt list
The table shows each branch, staged changes (+), commits ahead of main (↑1), unpushed commits (⇡), path, last commit and age. With an agent plugin, it also shows 🤖 for a working agent and 💬 for one waiting on you.
When a branch is done, you have two routes. For a pull-request workflow:
wt step commit # stage and commit
gh pr create
wt remove # after the PR merges
For a local merge, wt merge main commits any leftovers, squashes, rebases onto main, fast-forwards main, removes the worktree and branch, and drops you back in the main checkout.
The Features That Matter for Agents
Hooks
Hooks are shell commands that run at points in the lifecycle: pre-switch/post-switch, pre-start/post-start (on creation), pre-commit/post-commit, pre-merge/post-merge and pre-remove/post-remove. pre-* hooks block and abort on failure; post-* hooks run in the background with logged output. A project can check hooks into .config/wt.toml:
[[post-start]]
install = "npm ci"
[[post-start]]
build = "npm run build"
server = "npm run dev -- --port {{ branch | hash_port }}"
Here install runs first, then build and server together. The hash_port template filter turns the branch name into a stable port between 10000 and 19999, so ten worktrees can each run a dev server without colliding.
For security, project hooks need approval on first run, and again whenever a command changes, so a cloned repository’s wt.toml cannot silently run code on your machine. --yes skips the prompt for CI; keep it out of everyday aliases.
LLM commit messages
Worktrunk pipes a templated prompt with the staged diff to any command that reads stdin and prints a message. The docs show recipes for Claude Code (Haiku), Codex, OpenCode, llm and aichat:
[commit.generation]
command = "llm -m claude-haiku-4.5"
It is used by wt step commit, wt step squash and wt merge. With no generator configured, the message lists the changed files.
Sharing build caches
A fresh worktree has no node_modules/ or target/, so every agent starts with a cold build. wt step copy-ignored copies gitignored files from the main worktree, using reflinks (shared disk blocks) on APFS, btrfs, XFS and ReFS. The docs report a 14 GB Rust target/ taking 2 minutes and 14 GB with cp -R, versus 20 seconds and roughly no extra disk with reflinks, and the first build dropping from about 68 seconds to about 3. Those are the project’s numbers; on ext4 and NTFS every file is copied in full. For Python virtual environments, the docs recommend uv sync instead, since venvs contain absolute paths.
Agent plugins
wt config plugins claude install adds the Claude Code plugin; there are equivalents for Codex, OpenCode, Pi and oh-my-pi, and a Gemini CLI extension. What you get depends on the agent’s hook API. All of them get the 🤖/💬 activity markers in wt list. Claude Code and OpenCode 2 also get worktree isolation: when the agent creates its own worktree (for example a Claude Code subagent with isolation: "worktree"), the plugin routes that through wt switch --create and wt remove, so agent-made worktrees follow your naming, hooks and cleanup.
Smaller extras: wt switch pr:123 checks out a pull request, wt list --full adds CI status, and wt step prune removes merged worktrees.
Hands-on test (November 4, 2026)
We ran Worktrunk in a fresh ubuntu:24.04 container on a GitHub-hosted runner (x86_64, 2 CPUs, 8 GB RAM, no GPU) against commit bac7f7e137cf. We installed git, installed Worktrunk v0.81.0 with the project’s own shell installer, checked the version, created a demo repository, and walked through the README’s core loop: create a worktree, list it, commit in it, merge it back to main, then create and remove a throwaway worktree. The verdict is passed: 6 of 6 steps, in 11.9 seconds in total.
| Step | Result | Time |
|---|---|---|
| Install git and curl (apt) | git 2.43.0 | 10 s |
| Official installer for v0.81.0 | Downloaded the x86_64-unknown-linux-musl-static build; installed wt and git-wt to ~/.cargo/bin | 1.2 s |
wt --version | wt v0.81.0 | 0.1 s |
wt switch --create feature-auth, then git worktree list and wt list | Created branch and worktree at /tmp/demo/repo.feature-auth; wt list showed 2 worktrees with @ on main | 0.2 s |
Commit auth.rs in the worktree, wt merge main | ”Merged to main (1 commit, 1 file, +1)”; worktree and branch removed in the background; git worktree list showed only main | 0.2 s |
wt switch --create scratch, wt remove scratch | Worktree created at /tmp/demo/repo.scratch, then removed with its branch; only main left | 0.2 s |
What worked: the core loop does exactly what the README shows. The installer is a single static binary, each worktree landed next to the repo as repo.<branch>, and wt merge reported that a one-commit branch needed no squash or rebase before fast-forwarding main. Merge and remove both deleted the branch with the directory, the step people most often forget with plain git.
What surprised us: every command that would change directory printed “Cannot change directory — shell integration not installed.” Expected, since we skipped wt config shell install, but budget for it in scripts and CI.
What this test does not tell you: we did not configure hooks, LLM commits, the picker, CI status or any agent plugin, and we did not test copy-ignored (the build-cache numbers above are the project’s). We did not run parallel agents; the test shows the plumbing works, not how it feels with eight sessions open.
Things to Check Before You Adopt It
- Breaking changes are routine. v0.81.0 alone marks at least eight changes as breaking: hooks no longer receive JSON on stdin, templates moved to MiniJinja 3 (objects render Python-style, so use
| tojson), undefined variables now error, Nushell needs 0.113 or newer, and$XDG_CONFIG_DIRSis ignored for system config. If your team shares a.config/wt.tomlwith templated hooks, pin a version and read release notes before upgrading. - Worktrees are not sandboxes. Separate directories stop agents overwriting each other’s files, not running commands that touch your whole machine, a shared database or the same ports. Hooks can provision per-worktree ports and databases, but you write them.
- Disk use grows fast without reflinks. On ext4, ten worktrees with full
node_modulesare ten copies. Symlinks oruv syncare the documented workarounds. - Windows naming conflict.
wtis also Windows Terminal’s command, so Winget installs it asgit-wtunless you disable the Terminal alias. - One main maintainer. Roos writes most of the code (with heavy agent help; the repo has
AGENTS.md,.claude/and.codex/). CI and coverage are public, but it is still a bus-factor question.
Who Should Use It
- Developers running two or more coding agents at once on the same repository. This is the case it is built for, and the activity markers in
wt listare the best feature for it. - Worktree users with a pile of shell aliases, or anyone who context-switches a lot and is tired of
git stash.
Skip it if you work on one branch at a time, or if your agents run in cloud sandboxes where the vendor handles isolation.
Alternatives
| Tool | Focus | Compared with Worktrunk |
|---|---|---|
Plain git worktree + aliases | Built into git | Zero dependencies; you write your own cleanup and status |
| Herdr | Terminal multiplexer for agents | Manages agent sessions and panes; pairs with Worktrunk rather than replacing it |
| Orca | IDE for parallel agents | GUI with worktrees built in; Worktrunk is CLI-only and editor-neutral |
| ThinkRail | JetBrains IDE around the Pi agent | Workspace-per-worktree in an IDE; Worktrunk works with any agent |
| T3 Code | One app for several agent CLIs | Control surface for sessions; Worktrunk handles the git side |
Community Reactions
Worktrunk spread through agent communities rather than Hacker News. Roos announced the open-source release on r/ClaudeCode in late November 2025 as his daily driver for running Claude Code on 2 to 10 worktrees at a time. The HN submissions we found stayed small (the largest reached 14 points), though a June 2026 HN thread, “Who would have thought that git worktree is the technology of the year 2026?”, shows how much attention the workflow now gets. Someone also shipped a pure-bash alternative (gwt) in response. The README calls Worktrunk “the most popular git worktree manager”; that is the author’s claim.
FAQ
What is Worktrunk used for?
Managing git worktrees so you can work on several branches at once, each in its own directory. Its main use is running multiple AI coding agents in parallel on one repository without them editing the same files. Four commands cover the lifecycle: wt switch, wt list, wt merge and wt remove.
Is Worktrunk free?
Yes. It is dual-licensed under MIT and Apache-2.0, with no paid tier or account. LLM commit messages cost whatever your configured model provider charges.
Does Worktrunk work with Claude Code and Codex?
Yes. wt switch -x claude -c <branch> starts Claude Code in a new worktree, and the same works for codex or any other command. Plugins for Claude Code, Codex, OpenCode, Pi, oh-my-pi and Gemini CLI add activity markers in wt list; the Claude Code and OpenCode 2 plugins also route agent-created worktrees through Worktrunk.
Why does wt switch not change my directory?
Shell integration is not installed. Run wt config shell install and restart your shell. A child process cannot change its parent shell’s directory, so Worktrunk installs a small shell function to do it. Our test showed the warning Worktrunk prints when the integration is missing.
Does Worktrunk work on Windows?
Yes, via winget install max-sixty.worktrunk. Because wt clashes with Windows Terminal, it installs as git-wt unless you disable Terminal’s app execution alias.
Bottom Line
Worktrunk solves a small, specific problem very well: git worktrees have the right model for parallel agents and a poor interface, and Worktrunk gives them a good one. The core loop installed in about a second and worked first time in our test. Install shell integration, add your agent’s plugin, start with the four core commands, and pin a version if your team shares hook templates.
Sources
- max-sixty/worktrunk on GitHub: README, stars, license, issue counts
- Worktrunk v0.81.0 release notes
- Worktrunk documentation
- wt hook documentation
- wt step documentation (copy-ignored, commit, prune)
- LLM commit messages documentation
- Agent integration documentation
- r/ClaudeCode: Worktrunk release announcement
- Hacker News: Worktrunk – CLI for Git worktree management
- Hacker News: Who would have thought that git worktree is the technology of the year 2026?
- Show HN: Gwt, a minimal pure bash alternative to worktrunk