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
Task tool with team_name
- Observe: current window splits into 5+ panes
- Observe: some agents fail to start due to tmux
send-keys corruption
What Happens
send-keys gets garbled: mmcd instead of cd, mentcd instead of cd
- 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.
Summary
Agent teams created via
Tasktool withteam_namespawn 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
Tasktool withteam_namesend-keyscorruptionWhat Happens
send-keysgets garbled:mmcdinstead ofcd,mentcdinstead ofcdzsh: command not foundExpected Behavior
Agent teams should spawn in a new tmux window (or configurable target), preserving the user's current pane layout:
Environment
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1Workaround
Dispatch fewer agents (2 instead of 4), or handle crashed agents' tasks in the main session.