Parallel Coding Agents with Git Worktree x tmux
Over the past few years, the time I spend writing code myself has noticeably decreased. Instead, I find myself giving instructions to…
Parallel Coding Agents with Git Worktree x tmux
Over the past few years, the time I spend writing code myself has noticeably decreased. Instead, I find myself giving instructions to Coding Agents like Claude Code and Codex and letting them write the code.
When I was coding on my own, I had to invest my mental energy and stamina into design and implementation directly. Now, I spend more time waiting after delegating to agents — and my role feels like it’s fundamentally shifting.
Development as an Engineering Manager
Say you’re building a Todo list app with the following tasks queued up:
- Delete functionality for each item
- Add details functionality for each item
- Change the background colour from black to white
In the old days, since I was doing the design and coding myself, I had no choice but to execute them sequentially: 1 → 2 → 3.
With Coding Agents, you can assign Task 1 to Agent A, Task 2 to Agent B, and Task 3 to Agent C — all at the same time. It feels like being an Engineering Manager delegating work across a team of engineers.

Sequential vs concurrent task execution diagram
But I quickly ran into problems.
Wall 1: Code Conflicts
Running multiple agents in parallel on the same codebase causes their changes to conflict with each other.
The result: I was back to sequential execution anyway.
Solving It with Worktrees
After some research, I found that git worktree solves this problem. With worktrees, you can check out multiple independent working directories from the same repository — essentially checking out different branches into separate directories simultaneously. It’s a built-in Git feature.
This approach is actually endorsed by Boris Cherny, one of the creators of Claude Code, who called it the “Single biggest productivity unlock”. Apparently much of his team prefers worktrees too, which is why native worktree support was added to Claude Code.
With this, each Agent can run on its own independent worktree. Going back to the Todo list example, Tasks 1, 2, and 3 can all run simultaneously without waiting on each other.
Wall 2: Pane Hell
I use tmux for terminal session management. My approach was to create one window per project and split panes per worktree.
This worked fine when the project count was small and I only had one or two worktrees. But reality wasn’t so tidy.
Juggling two or three projects simultaneously, with up to five worktrees each, I fell into ”pane hell” almost immediately — no idea where any worktree was, no idea which Agent was working on which task.
Switching to Window-per-Worktree
I switched to creating one tmux window per worktree instead.
But this had its own friction.
Every time: create the worktree, launch Claude Code, add a shell pane, add a pane for reviewing source code (I use vim as my editor). Doing all of this manually every single time was tedious.
kage (Shadow)
Out of this frustration, I built a tool for managing worktrees at the window level with minimal effort.
The idea: control each Coding Agent like summoning shadow clones.
It’s a CLI tool that manages multiple Coding Agent sessions using tmux and git worktree.
Like the Shadow Clone technique, each Agent runs in parallel on its own independent worktree and tmux window. You can create, switch, and delete with a single key from a TUI dashboard.
It’s agent-agnostic — works with Claude Code, Codex, or any CLI-based tool.
Concretely, when you create a new feature branch, the following happens automatically:
- A git worktree is created in the specified repository
- A tmux window opens and splits panes according to your config
- Each pane launches the Agent or shell
From there, just switch windows from the TUI dashboard to check in on each Agent. When you delete, both the worktree and the tmux window are cleaned up together.

kage — demo
Closing Thoughts
Honestly, I’m still figuring out how to develop without becoming the bottleneck myself.
If you have better practices or workflows, I’d love to hear them.
메타데이터
- post_id
- be2a5a290f18
- slug
- parallel-coding-agents-with-git-worktree-x-tmux-be2a5a290f18
- url
- https://medium.com/@sean0628/parallel-coding-agents-with-git-worktree-x-tmux-be2a5a290f18
- canonical_url
- https://medium.com/@sean0628/parallel-coding-agents-with-git-worktree-x-tmux-be2a5a290f18
- author_url
- https://medium.com/@sean0628
- status
- ok
- fetched_at
- 2026-06-28 10:39:35