Agent teams: teammates stuck at idle prompt in tmux split-pane mode (mailbox never polled)
Bug Description
When using agent teams in tmux split-pane mode, spawned teammates start Claude Code successfully in their tmux panes but never process their initial mailbox message. They remain stuck at the idle welcome prompt indefinitely.
Environment
- Claude Code version: 2.1.32
- OS: macOS (Darwin 24.6.0)
- Terminal: iTerm2 running inside tmux
- Node: v20.14.0
- Feature flag:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1(set insettings.jsonunderenv) - Teammate mode:
auto(detects tmux → uses split panes)
Steps to Reproduce
- Start Claude Code inside a tmux session
- Create a team using the
Teammatetool (spawnTeam) - Create tasks using
TaskCreate - Spawn teammates using the
Tasktool withteam_nameparameter - Observe the tmux panes
Expected Behavior
Teammates should:
- Start Claude Code in their tmux panes
- Automatically poll their mailbox
- Pick up the initial prompt message
- Begin working on their assigned tasks
Actual Behavior
Teammates:
- ✅ Start Claude Code successfully (welcome screen visible, correct model loaded)
- ❌ Never poll their mailbox — messages remain
"read": falsein the inbox JSON files - ❌ Remain at the idle prompt indefinitely (showing "Try edit/refactor..." suggestions)
- ❌ Never process any tasks
Evidence
Mailbox files show unread messages:
[
{
"from": "team-lead",
"text": "Your task prompt here...",
"timestamp": "2026-02-08T05:39:39.923Z",
"read": false
}
]
Tmux panes show idle Claude Code:
Claude Code v2.1.32
▐▛███▜▌ Sonnet 4.5 · Claude Max
▝▜█████▛▘ ~/Desktop/code/playground
❯ Try "fix lint errors"
📁 playground 🤖 Sonnet 4.5
⏵⏵ accept edits on (shift+tab to cycle)
The CLI command launched in tmux panes does NOT include the prompt:
cd /Users/user/project && CLAUDECODE=1 claude \
--agent-id inv-politico@peru-inv \
--agent-name inv-politico \
--team-name peru-inv \
--agent-color blue \
--parent-session-id <uuid> \
--agent-type general-purpose \
--permission-mode acceptEdits \
--model sonnet
No --prompt or --message flag is passed. The prompt is only placed in the mailbox JSON file, but the idle agent never reads it.
Workarounds Attempted (all failed)
- Sending messages via
SendMessagetool — messages arrive in mailbox but are never read - Sending prompt via
tmux send-keys— text appears in the input field but doesn't get submitted/processed - Using different models (Opus, Sonnet) — same behavior
- With and without
run_in_background— same behavior - Multiple team creation attempts — consistently reproducible
Root Cause Hypothesis
The mailbox polling mechanism appears to only activate between conversation turns (after the agent has processed at least one message). At the initial idle prompt, the agent has never had a first turn, so it never enters the polling loop. The initial prompt needs to be delivered either:
- As a CLI argument to the
claudecommand (e.g.,claude "prompt text") - Via stdin to trigger the first turn
- Through a different mechanism that works at the idle state
Additional Notes
- The
in-processteammate mode was not tested (user wanted split-pane tmux mode) - The documentation warns: "tmux has known limitations on certain operating systems"
- Team config, task files, and inbox files are all created correctly — only the agent's mailbox processing is broken
- Tested with both
mode: bypassPermissionsand default mode — no difference
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗