{"slug": "worktrunk-git-worktrees-made-simple-for-parallel-ai-agents", "title": "Worktrunk: Git Worktrees Made Simple for Parallel AI Agents", "summary": "A developer released Worktrunk, an open-source Rust command-line tool that simplifies Git worktrees for running parallel AI coding agents like Claude Code and Codex. The tool, released in early 2026 under MIT or Apache-2.0 licenses, has surpassed 5,000 GitHub stars and lets users create, switch, and clean up isolated worktrees by branch name, with a `-x` flag for launching agents in separate directories.", "body_md": "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.\n\nThe 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.\n\nThe problem is that git's worktree commands are clunky. Just starting a new one looks like this:\n\n```\ngit worktree add -b feat ../repo.feat\ncd ../repo.feat\n```\n\nYou type the branch name three times. Cleaning up afterward takes another three commands. Do this ten times a day and it gets old fast.\n\n[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.\n\nIt's open source (MIT or Apache-2.0), was released at the start of 2026, and already has over 5k stars on GitHub.\n\nHere's how Worktrunk compares with plain git:\n\n| Task | Worktrunk | Plain git | \n|---|---|---|\n| Switch to a worktree | `wt switch feat` | `cd ../repo.feat` | \n| Create and start an agent | `wt switch -c -x claude feat` | `git worktree add -b feat ../repo.feat && cd ../repo.feat && claude` | \n| Clean up | `wt remove` | `cd ../repo && git worktree remove ../repo.feat && git branch -d feat` | \n| List with status | `wt list` | `git worktree list` (paths only) | \n\nFour commands cover most of what you'll do day to day.\n\nInstall with Homebrew (macOS and Linux):\n\n```\nbrew install worktrunk && wt config shell install\n```\n\nOr with Cargo:\n\n```\ncargo install worktrunk && wt config shell install\n```\n\nThe `wt config shell install` step matters. It adds shell integration so `wt` can actually change your current directory.\n\nCreate a worktree for a new feature:\n\n```\nwt switch --create feature-auth\n```\n\nThis creates the branch and the worktree, then moves you into it. Check all your worktrees and their status with:\n\n```\nwt list\n```\n\nWhen you're done, you can open a PR as usual and run `wt remove` after it merges. Or merge locally with one command:\n\n```\nwt merge main\n```\n\nThat commits your changes, rebases onto main, merges, and removes the worktree and branch.\n\nThis is where Worktrunk shines. Start three agents on three tasks, each in its own isolated worktree:\n\n```\nwt switch -x claude -c feature-a -- 'Add user authentication'\nwt switch -x claude -c feature-b -- 'Fix the pagination bug'\nwt switch -x claude -c feature-c -- 'Write tests for the API'\n```\n\nThe `-x` flag runs a command after switching, and everything after `--` is passed to that command. No agent touches another agent's files.\n\nBeyond the basics, Worktrunk includes:\n\n`node_modules/` or `target/` instead of starting cold.`wt switch pr:123`.\nYes, if you:\n\nA 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.\n\nIf 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.", "url": "https://wpnews.pro/news/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents", "canonical_source": "https://dev.to/arshtechpro/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents-1106", "published_at": "2026-09-19 21:08:11+00:00", "updated_at": "2026-09-19 21:24:25.748885+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["Worktrunk", "Git", "Rust", "Claude Code", "Codex", "GitHub", "Homebrew", "Cargo"], "alternates": {"html": "https://wpnews.pro/news/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents", "markdown": "https://wpnews.pro/news/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents.md", "text": "https://wpnews.pro/news/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents.txt", "jsonld": "https://wpnews.pro/news/worktrunk-git-worktrees-made-simple-for-parallel-ai-agents.jsonld"}}