Install into Claude Code with one paste.
Manage multiple Claude Code agents from one terminal. Named workspaces, surface management, spawn script, session mapping hook, socket API.
Includes: quick reference · spawn-workspace.sh · session-map hook · socket API docs
3 core commands
| Command | What it does |
|---|---|
cmux list-workspaces | See all agents running |
cmux read-screen --workspace ws:N | Peek without interrupting |
cmux send --workspace ws:N "msg" | Talk to any agent |
Workspace management
# Create named workspace (no focus steal)
CURRENT=$(cmux current-workspace 2>&1 | awk '{print $1}')
NEW_UUID=$(cmux new-workspace --command "claude 'prompt'" 2>&1 | awk '{print $2}')
cmux rename-workspace --workspace "$NEW_UUID" "name" 2>&1
cmux select-workspace --workspace "$CURRENT" 2>&1
spawn-workspace.sh - one command to create a named workspace with optional infinite loop and auto-handoff:
bash .claude/skills/cmux/scripts/spawn-workspace.sh "research" \
--prompt "Research topic X"
# With auto-handoff at 60% context
bash .claude/skills/cmux/scripts/spawn-workspace.sh "long-task" \
--prompt "Do the thing" --loop 60
Session mapping hook - tracks which Claude session is in which workspace via /tmp/cmux-session-map.json.
Socket API - programmatic control via /tmp/cmux.sock:
| Method | Purpose |
|---|---|
workspace.list | List all workspaces |
workspace.create | Create new workspace |
surface.send_text | Send text to terminal |
set-status | Sidebar status pill |
set-progress | Progress bar (0.0-1.0) |
notification.create | Push notification |
Full API docs: cmux.dev/docs/api