[BUG] Tmux-based team agents spawn Claude Code sessions but never receive initial prompt via mailbox
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
- Start Claude Code inside an existing tmux session
- Ensure
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1is in settings.json - Create a team:
- Use Teammate tool:
spawnTeamwith a team name
- Create tasks with TaskCreate
- Spawn 1+ teammates:
- Use Task tool with
subagent_type: "general-purpose",name: "agent-1",team_name: "my-team",run_in_background: true
- Observe tmux panes — agents sit at Claude Code startup prompt, 0 tokens
- Check
~/.claude/teams/{team}/inboxes/{agent}.json— messages show"read": false - Wait 60+ seconds — no change
tmux send-keysto 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 viatmux list-panes)"prompt"field populated with full spawn prompt- Pane processes alive (
noderunning, confirmed viatmux 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' Entertypes 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗