Agent teams: teammates stuck at idle prompt in tmux split-pane mode (mailbox never polled)

Resolved 💬 4 comments Opened Feb 8, 2026 by jaromeroh Closed Feb 11, 2026

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 in settings.json under env)
  • Teammate mode: auto (detects tmux → uses split panes)

Steps to Reproduce

  1. Start Claude Code inside a tmux session
  2. Create a team using the Teammate tool (spawnTeam)
  3. Create tasks using TaskCreate
  4. Spawn teammates using the Task tool with team_name parameter
  5. Observe the tmux panes

Expected Behavior

Teammates should:

  1. Start Claude Code in their tmux panes
  2. Automatically poll their mailbox
  3. Pick up the initial prompt message
  4. Begin working on their assigned tasks

Actual Behavior

Teammates:

  1. ✅ Start Claude Code successfully (welcome screen visible, correct model loaded)
  2. Never poll their mailbox — messages remain "read": false in the inbox JSON files
  3. ❌ Remain at the idle prompt indefinitely (showing "Try edit/refactor..." suggestions)
  4. ❌ 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)

  1. Sending messages via SendMessage tool — messages arrive in mailbox but are never read
  2. Sending prompt via tmux send-keys — text appears in the input field but doesn't get submitted/processed
  3. Using different models (Opus, Sonnet) — same behavior
  4. With and without run_in_background — same behavior
  5. 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 claude command (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-process teammate 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: bypassPermissions and default mode — no difference

View original on GitHub ↗

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