[BUG] Tmux-based team agents spawn Claude Code sessions but never receive initial prompt via mailbox

Resolved 💬 4 comments Opened Feb 5, 2026 by nlovell1 Closed Feb 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using experimental agent teams (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1) in tmux, spawned teammates start Claude Code sessions in their panes but never receive their initial prompt. Sessions sit idle at the startup screen with 0 tokens consumed indefinitely.

Mailbox files at ~/.claude/teams/{team}/inboxes/{agent}.json contain messages with "read": false — agents never poll or consume them.

Reproduced twice with 4 agents each (8 total failures). One agent also spawned with a corrupted model name (claude-opus-4-6cd instead of claude-opus-4-6).

What Should Happen?

Each teammate should automatically receive the spawn prompt from the mailbox, begin processing it (reading files, web searches, messaging other teammates), and show token consumption in the tmux pane.

Error Messages/Logs

No error messages — agents silently fail to connect.

Mailbox state (never consumed):
{"from": "team-lead", "text": "...", "timestamp": "...", "read": false}

Tmux pane state (idle indefinitely, 60+ seconds):
❯ Try "fix typecheck errors"
⏵⏵ bypass permissions on (shift+tab to cycle)    0 tokens

One agent (1 out of 8) showed corrupted model name:
⏺ There's an issue with the selected model (claude-opus-4-6cd).
  It may not exist or you may not have access to it.

Steps to Reproduce

  1. Start Claude Code inside an existing tmux session
  2. Ensure CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is in settings.json
  3. Create a team:
  • Use Teammate tool: spawnTeam with a team name
  1. Create tasks with TaskCreate
  2. Spawn 1+ teammates:
  • Use Task tool with subagent_type: "general-purpose", name: "agent-1", team_name: "my-team", run_in_background: true
  1. Observe tmux panes — agents sit at Claude Code startup prompt, 0 tokens
  2. Check ~/.claude/teams/{team}/inboxes/{agent}.json — messages show "read": false
  3. Wait 60+ seconds — no change
  4. tmux send-keys to type into pane — text appears but Claude Code doesn't process it

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.32

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Team config structure (from config.json)

Each spawned member had correct-looking config:

  • "backendType": "tmux"
  • "tmuxPaneId": "%N" (valid pane IDs confirmed via tmux list-panes)
  • "prompt" field populated with full spawn prompt
  • Pane processes alive (node running, confirmed via tmux list-panes -F)

Observations

  • tmux panes are alive (node process running, accepting keystrokes) but Claude Code sessions inside them are not connected to the team coordination layer
  • tmux send-keys -t %N 'hello' Enter types text but doesn't trigger processing — suggests input handling differs from standard terminal input
  • Shutdown requests via SendMessage also land in mailbox but are never consumed
  • Cleaned up and retried from scratch — identical behavior on second attempt

Related

#14109 — architectural proposal to replace tmux-based agent communication with MCP. This bug report provides a concrete reproduction case for the tmux backend's failure mode.

View original on GitHub ↗

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