claude-code - 💡(How to fix) Fix Agent teams: teammate panes never start the agent (stay in idle shell)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

With CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, teammate panes are created but the agent process never starts inside them. The pane sits at an idle shell prompt while the lead agent waits for replies that never arrive.

Root Cause

With CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, teammate panes are created but the agent process never starts inside them. The pane sits at an idle shell prompt while the lead agent waits for replies that never arrive.

Fix Action

Workaround

# in ~/.tmux.conf — scoped to the agent-teams tmux socket only
%if "#{m:*claude-swarm-*,#{socket_path}}"
  set -g default-command 'PATH="$HOME/.local/bin:$PATH" exec /bin/sh'
%endif

Code Example

# in ~/.tmux.conf — scoped to the agent-teams tmux socket only
%if "#{m:*claude-swarm-*,#{socket_path}}"
  set -g default-command 'PATH="$HOME/.local/bin:$PATH" exec /bin/sh'
%endif
RAW_BUFFERClick to expand / collapse

Summary

With CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, teammate panes are created but the agent process never starts inside them. The pane sits at an idle shell prompt while the lead agent waits for replies that never arrive.

Repro

  1. CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 claude
  2. Ask the lead for a trivial task that triggers agent teams — e.g. "create an agent team that writes a hello-world script in bash and another in python."
  3. Attach to the swarm: tmux -L claude-swarm-<lead-pid> a.

Observed

Each pane is running zsh (per #{pane_current_command}) — no agent process was launched. The intended … claude.exe --agent-id … spawn command is visible on screen, but it was never delivered to the shell's input: pressing Enter at the prompt is a no-op.

Re-running the same spawn command in the pane after shell init has finished launches the agent correctly, so the command itself is fine — only the initial delivery doesn't take.

Notes

  • Shell is zsh 5.9 with powerlevel10k plus plugins, so interactive init takes a few hundred ms.
  • Does not reproduce with a faster shell: setting default-command "/bin/sh" on the claude-swarm tmux socket makes panes start reliably.

Workaround

# in ~/.tmux.conf — scoped to the agent-teams tmux socket only
%if "#{m:*claude-swarm-*,#{socket_path}}"
  set -g default-command 'PATH="$HOME/.local/bin:$PATH" exec /bin/sh'
%endif

Environment

  • Claude Code 2.1.143, macOS 26.3, tmux 3.6, zsh 5.9 (powerlevel10k + plugins)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING