Team agents spawned via tmux don't receive prompts or poll inbox
Bug Description
When spawning teammate agents using the Teammate (spawnTeam) + Task tool with team_name and name parameters, the agents launch as Claude Code processes in tmux panes but sit idle at the startup screen — they never receive their initial prompt or read messages from their inbox.
Environment
- Claude Code version: 2.1.32
- Model: Claude Opus 4.6 (team lead), Haiku 4.5 (teammates)
- OS: macOS (Darwin 24.6.0)
- Backend: tmux
Steps to Reproduce
- Create a team:
````
Teammate(operation: "spawnTeam", team_name: "test-team", description: "Test")
- Create tasks and assign them:
````
TaskCreate(subject: "Test task", description: "Run ls and report back")
TaskUpdate(taskId: "1", owner: "agent-1", status: "in_progress")
- Spawn a teammate with a prompt:
````
Task(
subagent_type: "general-purpose",
prompt: "You are agent-1. Run ls and report back.",
name: "agent-1",
team_name: "test-team",
model: "haiku"
)
- Observe: tmux pane opens with Claude Code but the agent sits at the idle startup screen (
Try "write a test for <filepath>") and never executes the prompt.
- Try sending messages via
SendMessage— messages are written to inbox files but agent never reads them.
What's Happening Under the Hood
Config is correct — ~/.claude/teams/test-team/config.json contains the full prompt in the member's prompt field.
Inbox files are written correctly — ~/.claude/teams/test-team/inboxes/agent-1.json contains all messages (task assignment, spawn prompt, direct messages) with "read": false.
But the CLI command doesn't pass the prompt — the tmux pane shows the launch command:
cd /path/to/project && CLAUDECODE=1 /path/to/claude/2.1.32 \
--agent-id agent-1\@test-team \
--agent-name agent-1 \
--team-name test-team \
--agent-color blue \
--parent-session-id <uuid> \
--agent-type general-purpose \
--model haiku
Notice: no --prompt or -p flag is passed. The agent starts in interactive mode waiting for user input.
Inbox polling doesn't work — agents don't check their inbox on startup or on new message arrival. All messages remain "read": false indefinitely.
Expected Behavior
Either:
- The
promptfrom the Task tool should be passed as a CLI argument (e.g.,--prompt "..."or-p "...") so the agent starts executing immediately, or - The agent should poll its inbox file on startup and process pending messages
Actual Behavior
- Agent spawns in tmux as an idle Claude Code session
- Prompt is stored in config.json but never delivered to the running process
- Inbox messages accumulate but are never read
SendMessagewrites to inbox files but doesn't wake up the agentshutdown_requestalso has no effect (same inbox delivery issue)
Screenshots
Tmux showing two idle agent panes that never received their prompts:
The team lead's main pane shows successful spawn confirmations ("The agent is now running and will receive instructions via mailbox") but the agents never actually receive anything.
Workaround
None found. Agents cannot be communicated with after spawning.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗