Module 15 — tmux & agent teams

In this module

You'll learn how to multiply your work output by running multiple Claude Code agents in parallel via tmux, each specialized in a domain, coordinated by a lead agent, and isolated in their own worktree.

15.1 — Why tmux is a game-changer with Claude Code

When you work with Claude Code, you interact with a single terminal. You ask a question, you wait for the answer, you ask again. It's sequential. But imagine being able to launch three, four, five instances in parallel, each on a different part of your project, and monitor them all from a single screen. That's exactly what tmux enables.

tmux, short for terminal multiplexer, creates multiple sessions in your terminal, each containing windows, which are themselves splittable into panes. Unlike your terminal's native tabs, tmux persists server-side: you can detach from a session, close your terminal, and come back later — everything is still running. This is fundamental when your Claude Code agents are working on long-running tasks.

The architecture rests on three hierarchical levels. Sessions are the top level, complete workspaces. Windows are tabs inside a session. Panes are screen divisions inside a window. For a typical Agent Teams setup, you use one session, one window, and 4 panes: one large pane on the left for the lead, three stacked panes on the right for the teammates.

Installation is trivial:

# macOS
brew install tmux

# Ubuntu / Debian
sudo apt install tmux

# Arch
sudo pacman -S tmux

Why tmux rather than a native split (iTerm2, VS Code)? Three reasons. Persistence: tmux survives terminal closure. Scripting: you can fully automate the creation of complex layouts. Portability: tmux works everywhere, including over SSH on a remote server, which lets you run your agents on a powerful machine and connect from anywhere.

Key takeaways

• tmux = sessions > windows > panes, three hierarchy levels

• Server-side persistence: your agents keep going even if you close the terminal

• Typical Agent Teams layout: 1 large lead pane + 3 teammate panes

• tmux is scriptable — you can automate the full setup in a single command

In this module

  1. 15.1 — Why tmux is a game-changer with Claude Code Available
  2. 15.2 — Essential tmux shortcuts
  3. 15.3 — The Agent Teams concept
  4. 15.4 — Agent Teams vs Subagents: when to use what
  5. 15.5 — Creating and configuring your specialized agents
  6. 15.6 — Automated tmux setup for Agent Teams
  7. 15.7 — The Lead/Teammates coordination workflow
  8. 15.8 — Worktree isolation: each agent in its own repo copy
  9. 15.9 — Hands-on case: multi-layer refactoring with 3 teammates
  10. 15.10 — Optimization, costs and limits

Locked content

Unlock the full course to access this module.

Unlock

Already purchased? Recover access