Agent teams: tmux split panes not visible in iTerm2 — creates hidden tmux socket instead

Resolved 💬 3 comments Opened Mar 30, 2026 by jplimack-ai Closed May 3, 2026

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 — $TMUX is unset)
  • it2 CLI is installed at /Users/<user>/.local/bin/it2
  • ITERM_SESSION_ID is 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 it2 CLI 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗