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