tmux (terminal multiplexer) lets you run multiple terminal sessions inside one window. Sessions survive disconnects — close your terminal or lose SSH, and everything keeps running.
tmux is optional. It powers kavex-monitor, a split-pane dashboard:
┌─────────────────────────────────┬──────────────────┐
│ │ │
│ kavex-loop running │ Live dashboard │
│ (implement → verify → │ (progress, │
│ review → commit) │ stuck items) │
│ │ │
└─────────────────────────────────┴──────────────────┘
Without tmux, Kavex still works — just run /kavex:loop or bash .claude/hooks/kavex-loop.sh prd.md directly.
brew install tmuxsudo apt update && sudo apt install tmuxsudo dnf install tmuxsudo pacman -S tmuxtmux -V
# Expected: tmux 3.xtmux has 3 layers:
Session ← a named workspace (survives terminal close)
└── Window ← like a browser tab
└── Pane ← a split within a window
| Command | What it does |
|---|---|
tmux |
Start a new unnamed session |
tmux new -s work |
Start a session named "work" |
tmux ls |
List all sessions |
tmux attach -t work |
Re-attach to "work" |
tmux kill-session -t work |
Kill "work" session |
All tmux shortcuts start with Ctrl+b (the prefix key). Press Ctrl+b, release, then press the next key.
| Shortcut | What it does |
|---|---|
Ctrl+b then d |
Detach — leave session (it keeps running) |
Ctrl+b then % |
Split pane left/right |
Ctrl+b then " |
Split pane top/bottom |
Ctrl+b then arrow keys |
Move between panes |
Ctrl+b then z |
Zoom/unzoom current pane |
Ctrl+b then x |
Close current pane |
| Shortcut | What it does |
|---|---|
Ctrl+b then c |
Create new window |
Ctrl+b then n |
Next window |
Ctrl+b then p |
Previous window |
Ctrl+b then 0-9 |
Jump to window by number |
Ctrl+b then , |
Rename current window |
| Shortcut | What it does |
|---|---|
Ctrl+b then [ |
Enter copy/scroll mode |
q |
Exit copy mode |
arrow keys or PgUp/PgDn |
Scroll |
tmux new -s deploy
./deploy.sh
# Ctrl+b d → detach, deploy keeps running
# Later:
tmux attach -t deploytmux new -s dev
npm run dev
# Ctrl+b % → split right
# Right pane: run tests or edit codessh myserver
tmux new -s remote-work
# Do your work...
# WiFi dies? No problem.
# Reconnect:
ssh myserver
tmux attach -t remote-work
# Everything is still therekavex-monitor start docs/prd.md
# or
.claude/kavex monitor start docs/prd.mdThis creates a tmux session with:
- Left pane:
kavex-loop.shrunning your PRD - Right pane: live progress dashboard
kavex-monitor attachkavex-monitor statuskavex-monitor stopPress Ctrl+b then d. The loop keeps running in the background.
SESSION MANAGEMENT PANES WINDOWS
tmux new -s name Ctrl+b % split right Ctrl+b c new
tmux attach -t name Ctrl+b " split down Ctrl+b n next
tmux ls Ctrl+b → move right Ctrl+b p prev
tmux kill-session -t name Ctrl+b z zoom toggle Ctrl+b 0 jump to #0
Ctrl+b d detach Ctrl+b x close pane Ctrl+b , rename
| Problem | Solution |
|---|---|
tmux: command not found |
Install tmux (see Installation above) |
no server running |
No active sessions. Start one with tmux |
sessions should be nested |
You're already inside tmux. Detach first (Ctrl+b d) |
| Can't scroll | Enter copy mode: Ctrl+b [, then use arrow keys |
| Panes too small | Zoom one pane: Ctrl+b z |