Agent teams should spawn in new tmux window, not split current pane
Open 💬 8 comments Opened Feb 6, 2026 by anupamchugh
Summary
Agent teams created via Task tool with team_name spawn new tmux panes by splitting the current window. This breaks the user's existing layout and causes command corruption when multiple agents start simultaneously.
The future of agentic coding is bottlenecked by a tmux split-pane race condition.
Reproduction
- Have a tmux session with an existing pane layout
- Spawn 4+ agent teammates via
Tasktool withteam_name - Observe: current window splits into 5+ panes
- Observe: some agents fail to start due to tmux
send-keyscorruption
What Happens
send-keysgets garbled:mmcdinstead ofcd,mentcdinstead ofcd- Agents that receive corrupted commands fail with
zsh: command not found - User's existing tmux layout is destroyed
- 2 out of 4 agents crashed before executing any work
Expected Behavior
Agent teams should spawn in a new tmux window (or configurable target), preserving the user's current pane layout:
# Current behavior
tmux split-window -h # splits current pane, corrupts send-keys at scale
# Proposed behavior
tmux new-window -n "agent-team-{team_name}"
tmux split-window -h # split within the new window
Environment
- macOS Darwin 25.1.0 (Apple Silicon)
- Claude Code with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 - tmux 3.x
- 4 agents dispatched simultaneously
Workaround
Dispatch fewer agents (2 instead of 4), or handle crashed agents' tasks in the main session.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗