Agent teams: tmux split panes not visible in iTerm2 — creates hidden tmux socket instead
Description
When using agent teams with teammateMode: "tmux" in iTerm2, teammate panes are created in a private tmux socket (claude-swarm-<PID>) instead of splitting panes in the current iTerm2 window. The panes exist but are invisible to the user — they must manually tmux -L claude-swarm-<PID> attach to see them.
Expected behavior
Per the docs: "The tmux setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal." Since iTerm2 is detected (ITERM_SESSION_ID is set, it2 CLI is installed), panes should appear in the user's current iTerm2 window — either as native iTerm2 split panes or via tmux -CC (iTerm2 control mode integration).
This worked correctly in a previous session but regressed.
Actual behavior
teammateMode: "tmux"in~/.claude.json- Running in iTerm2 (not inside tmux —
$TMUXis unset) it2CLI is installed at/Users/<user>/.local/bin/it2ITERM_SESSION_IDis set- TeamCreate spawns agents into a hidden tmux session using a private socket:
tmux -L claude-swarm-<lead-PID> - Panes are real (verified via
tmux -L claude-swarm-<PID> list-panes -a) but NOT visible in iTerm2 - User must manually attach to see agent output
Environment
- Claude Code v2.1.87
- macOS Darwin 25.3.0 (Apple Silicon)
- iTerm2 with
it2CLI installed ~/.claude.json:{ "teammateMode": "tmux" }CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
Impact
For DevLoop (8-team UAT swarm), invisible panes mean the user cannot monitor agent progress, cannot interact with individual agents, and cannot tell if agents are stuck or asking for permissions. This defeats the purpose of split-pane mode.
Workaround
Manually attach: tmux -L claude-swarm-<PID> attach -t claude-swarm
But this opens in a separate terminal — not integrated with iTerm2 as intended.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗