Worktrunk: git worktrees for parallel coding agents
Added NewCopyable prompt below
Published Last verified Released
Our verdict
Worth installing if you already run two or more Claude Code or Codex sessions on the same repo and juggle them with git stash or plain git worktree commands. One command creates a branch plus its own worktree and starts the agent in it, wt list shows every branch's status, and wt merge and wt remove clean up after. The extras are what save time once you run five or more agents: hooks that install dependencies or start a dev server per worktree, a unique port per worktree, and copy-on-write build caches so new worktrees skip rebuilding node_modules or target. It was #2 on GitHub Trending on 2026-11-05 (about 11,200 stars, +531 that day) and builders on Hacker News say they use it daily, but it is a workflow tool, not an agent: you still review and merge each branch yourself.
- Who it's for
- Developers who run several terminal coding agents (Claude Code, Codex and similar) in parallel on the same repository
- Leverage
- Spin up an isolated workspace per agent task in one command and clean it up in one, instead of typing three git commands per worktree and fighting port and dependency clashes
- Effort
- Low
- Date added
What it does
Worktrunk (max-sixty/worktrunk, MIT OR Apache-2.0, crate worktrunk, first published on crates.io 2025-11-03, command wt) is a CLI for git worktree management built for parallel A.I. agent work. Worktrees are addressed by branch name and their paths come from a template. Core commands: wt switch (with -c to create and -x to run a command such as claude in the new worktree), wt list (status, ahead/behind, and with --full CI status and LLM summaries per branch), wt remove, and wt merge (squash, rebase, merge and clean up in one step). It also has lifecycle hooks (pre-start and post-start on create, plus commit, merge, switch and remove hooks, with post-* hooks running in the background), LLM-generated commit messages, PR checkout with wt switch pr:123, an interactive picker, a hash_port template filter for a dev server per worktree, and wt step copy-ignored to share build caches copy-on-write on APFS, btrfs and XFS. Installs via Homebrew, Cargo, Winget (as git-wt), pacman or conda-forge, then wt config shell install adds the shell integration it needs to change directories. Risks: hooks run shell commands from config, so read project hooks before trusting a repo's; on Windows the wt name clashes with Windows Terminal; and each worktree still needs its own disk space unless your filesystem supports copy-on-write.
How builders use it
- Install with brew install worktrunk (or cargo install worktrunk), then run wt config shell install once so wt can change your directory.
- Start each agent task in its own worktree: wt switch -c -x claude fix-login creates the branch and worktree and opens Claude Code in it.
- Add a post-start hook for dependency installs or a dev server, and use the hash_port filter so every worktree gets its own port.
- Check every agent's branch with wt list, then wt merge to squash, merge and clean up the ones you approve, or wt remove to drop the rest.
What to expect
Each agent works in its own directory on its own branch, so parallel sessions stop overwriting each other, and creating or cleaning up a workspace becomes one command instead of three.
Copy this: Install + one worktree per agent
# Official source: github.com/max-sixty/worktrunk (MIT OR Apache-2.0), docs at worktrunk.dev
# Install (macOS and Linux), then add shell integration
brew install worktrunk && wt config shell install
# or: cargo install worktrunk && wt config shell install
# Windows: winget install max-sixty.worktrunk, then use git-wt
# New branch + worktree, start Claude Code in it
wt switch -c -x claude fix-login
wt switch -c -x codex add-tests
# See every worktree's status
wt list
wt list --full # adds CI status and LLM summaries
# Jump to a pull request's branch
wt switch pr:123
# Merge an approved branch and clean up, or drop one
wt merge
wt removeRelated discoveries
See the newest picks →- ToolMulti-Step Agent Setups
Corgi: watch all your coding agents in one terminal
An MIT-licensed terminal multiplexer, like tmux, that shows which of your Claude Code, Codex, Pi or OpenCode agents is working, finished or waiting for you.
Effort: LowPrompt#Local / BYO model#Open source
- ToolCoding & Shipping Agents
OpenAI Codex CLI
OpenAI's open-source, lightweight coding agent for your terminal.
Effort: Low#Open source#CLI
- ToolCoding & Shipping Agents
Aider
Open-source A.I. pair programming in your terminal, with git commits built in.
Effort: Low#Local / BYO model#Open source
- ToolCoding & Shipping Agents
Gemini CLI
Google's open-source agent that brings Gemini into your terminal.
Effort: Low#Open source#CLI
Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.