Orchestrating multiple coding agents in parallel

June 18, 2026


With LLMs improving at a breakneck speed in the past year, my software development workflows have transformed: Instead of focusing on 1-2 tickets at a time, I now comfortably juggle 2-4 in parallel.

But managing different changes in the same codebase feels awkward: One agent could rewrite a file for one ticket, but another agent might need that same file unchanged. Switching between Git branches sucks! You have to stash pending changes, switch the branch, and rebuild the context in your head.

After some experimentation, I landed on this: a Git worktree per task, run through cmux.

A worktree per task

I love Git worktrees. Each worktree is a separate checkout of the same repo, on its own branch, in its own directory, so one agent can work without touching another's files. The feature has been in Git for years but has recently exploded in popularity thanks to AI.

For each new task, I spin up a fresh worktree with a short zsh function gwta (git worktree add) that branches off the latest main and drops me into a ready-to-run directory. My helper looks something like this:

function gwta() {
  local name="$1"
  local worktree_path="$HOME/dev/worktrees/${name[1,15]}"

  # Branch off the freshly-updated primary branch (main, develop, etc.)
  local primary
  primary=$(git symbolic-ref --short refs/remotes/origin/HEAD)
  primary="${primary#origin/}"
  git fetch origin "$primary:$primary"
  git worktree add --no-track -b "$name" "$worktree_path" "$primary"

  cd "$worktree_path"
  cp "$OLDPWD"/.env* "$worktree_path"/ 2>/dev/null  # carry over local secrets
  [[ -f package.json ]] && npm install              # ready to run
}

First attempt with tmux

If my love for Git worktrees is a 7, then mine for tmux is a 9. I used it for everything, including running Claude Code from my phone, so my first instinct was to have a tmux session per worktree.

This worked great. tmux is powerful software and endlessly customizable: I added many quality-of-life tweaks to my config, like vim-aware pane navigation, sessions that survived reboots through the resurrect and continuum plugins, and more.

But tmux wasn't perfect. It requires workarounds to play well with some software, and I wasn't a huge fan of the two-touch keyboard shortcuts.

Running agents with tmux was also clunky. Nothing told me which agent was waiting on input, so I had to cycle through windows to check. I was asking a terminal multiplexer to be an agent dashboard, which it was never built for.

Second attempt with cmux

cmux is a native macOS terminal built for this. It is open source, runs on Ghostty's rendering engine, and is made for running coding agents in parallel.

The cmux interface

My first favorite thing about it is the sidebar. Each worktree gets a vertical tab showing its branch name, PR status, open ports, and a badge when the agent needs me. I see all of my agents at once. The thing I kept losing track of in tmux is now the default view.

My second favorite thing: it's keyboard-first. One of the Claude Code sessions is ready for me? Shift + Command + U, and I'm there. No more wondering where that session is and having to manually get there.

Some extra nice things: native notifications, a built-in browser for checking the app an agent is building, and session persistence like tmux. With well-thought-out default settings, my config is minimal:

~/.config/cmux/cmux.json
{
  "app": { "minimalMode": true },
  "terminal": { "copyOnSelect": true }
}

I still use gwta to create each worktree, but cmux now gives them a better home.

Put together, the setup gets out of my way. Worktrees keep each ticket isolated, and cmux keeps the agents organized and a keystroke away. The blocker now is me. I cap myself at 2-4 tickets because my brain can't hold more context than that. Like Karpathy said, humans are the bottleneck. I think that's a good thing: AI can build solutions faster than ever, but they're still solutions to human problems. And who understands those problems better than humans?