Issue 03 | Development Environment Setup: tmux and Claude Collaboration System
3.1 Environment Setup
3.1.1 Prerequisites
# Confirm Claude Code is installed
claude --version
# Confirm tmux is installed
tmux -V
# IMPORTANT: Agent teams is disabled by default.
# You must enable it by setting the environment variable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
# Method A: Add to your shell config (e.g., .zshrc):
# export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
# Method B: Add to .claude/settings.json:
# { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }
# Create project directory
mkdir -p ~/work/teamtest && cd ~/work/teamtest
3.1.2 tmux Environment Initialization
Create scripts/setup-team.sh:
#!/bin/bash
SESSION="calc-dev"
# If session already exists, kill it first
tmux kill-session -t "$SESSION" 2>/dev/null
# Create new session
tmux new-session -d -s "$SESSION" -n "team-lead"
# Create agent panes (horizontal split)
tmux split-window -h -t "$SESSION" -n "ui-dev"
tmux split-window -h -t "$SESSION" -n "logic-dev"
# Set pane titles
tmux select-pane -t "$SESSION:0.0" -T "team-lead"
tmux select-pane -t "$SESSION:0.1" -T "ui-dev"
tmux select-pane -t "$SESSION:0.2" -T "logic-dev"
# Even layout
tmux select-layout -t "$SESSION" even-horizontal
echo "tmux session '$SESSION' created with 3 panes"
echo "Attach: tmux attach -t $SESSION"
tmux attach -t "$SESSION"
Enable mouse support (inside tmux):
:set -g mouse on
3.1.3 tmux Window Switching Guide
| Action | Hotkey | Description |
|---|---|---|
| Switch pane | Ctrl+B then Arrow keys |
Move between panes |
| Fullscreen current pane | Ctrl+B then z |
Press again to restore |
| Scroll to view history | Ctrl+B then [ |
Enter copy mode, use arrow keys/q/pgup/pgdn |
| Exit copy mode | q |
- |
| Switch session | Ctrl+B then s |
List all sessions |
| View all panes | tmux list-panes -a |
Execute in any pane |
Key Discovery: The Agent actually runs in a tmux session automatically created by Claude Code (e.g., session 2, session 4), not the
calc-devsession. The panes of thecalc-devsession are always emptyzshshells. To view the actual running status of the agent, usetmux list-sessionsto find the corresponding session, thentmux switch-client -t <session>to switch to it.