claude-code - 💡(How to fix) Fix Agent team lead (@main) stalls after teammates report back — requires keypress to resume [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46691Fetched 2026-04-12 13:35:34
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

When running an agent team (4 teammates: researcher, analyst, architect, devils-advocate) with the @main session as team lead, the main agent repeatedly stalls after all dispatched teammates have completed their tasks and sent their reports back via SendMessage.

The teammates finish their work, send their reports, and go idle. The main agent has received all the messages (they appear in the conversation) but does not proceed with its next action (processing the results, updating state, dispatching the next round). The main agent appears frozen — no tool calls, no text output, no progress.

Any keystroke in the @main tmux pane (Enter, arrow key, any character) immediately unblocks the agent. It then processes all the queued teammate reports and continues as expected.

Root Cause

When running an agent team (4 teammates: researcher, analyst, architect, devils-advocate) with the @main session as team lead, the main agent repeatedly stalls after all dispatched teammates have completed their tasks and sent their reports back via SendMessage.

The teammates finish their work, send their reports, and go idle. The main agent has received all the messages (they appear in the conversation) but does not proceed with its next action (processing the results, updating state, dispatching the next round). The main agent appears frozen — no tool calls, no text output, no progress.

Any keystroke in the @main tmux pane (Enter, arrow key, any character) immediately unblocks the agent. It then processes all the queued teammate reports and continues as expected.

Fix Action

Workaround

Press any key in the @main tmux pane when it appears stuck. This immediately unblocks processing.

Code Example

{
  "teammateMode": "tmux",
  "permissions": { "defaultMode": "auto" },
  "outputStyle": "default",
  "effortLevel": "high"
}
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code: 2.1.101
  • Model: claude-opus-4-6 (1M context)
  • OS: macOS 26.3.1 (Darwin 25.3.0, arm64 / Apple M2)
  • Node.js: v25.8.1
  • Terminal: Warp v0.2026.03.04.08.20.stable
  • Shell: zsh
  • Teammate mode: tmux
  • CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: "1"

Relevant settings

{
  "teammateMode": "tmux",
  "permissions": { "defaultMode": "auto" },
  "outputStyle": "default",
  "effortLevel": "high"
}

Description

When running an agent team (4 teammates: researcher, analyst, architect, devils-advocate) with the @main session as team lead, the main agent repeatedly stalls after all dispatched teammates have completed their tasks and sent their reports back via SendMessage.

The teammates finish their work, send their reports, and go idle. The main agent has received all the messages (they appear in the conversation) but does not proceed with its next action (processing the results, updating state, dispatching the next round). The main agent appears frozen — no tool calls, no text output, no progress.

Any keystroke in the @main tmux pane (Enter, arrow key, any character) immediately unblocks the agent. It then processes all the queued teammate reports and continues as expected.

Reproduction steps

This happened consistently across all 4 iterations of a research workflow:

  1. Team lead creates a team via TeamCreate and spawns 4 teammates via Agent tool with team_name parameter
  2. Team lead sends research questions to 3-4 teammates via SendMessage
  3. Teammates work independently (web search, code analysis, file reads, etc.)
  4. Teammates complete work and send reports back via SendMessage
  5. Teammate idle notifications arrive in main session
  6. BUG: Main agent stalls here. Does not process reports or take next action.
  7. User presses any key in the main tmux pane
  8. Main agent immediately resumes — processes all reports, continues workflow

This occurred at every iteration boundary (after iteration 1, 2, 3, and 4 dispatches). The stall duration varied — the agent would not self-recover without human input.

Expected behavior

The @main agent should automatically resume processing when teammate messages are delivered to its inbox. No human keypress should be required.

Actual behavior

The @main agent freezes after receiving teammate messages and idle notifications. It requires a physical keypress in its tmux pane to resume execution.

Impact

This defeats the purpose of autonomous agent teams. The team lead should be able to orchestrate multi-iteration research loops without human intervention between iterations. Currently, the human must monitor the tmux panes and manually prod the main agent each time teammates complete their work.

Workaround

Press any key in the @main tmux pane when it appears stuck. This immediately unblocks processing.

extent analysis

TL;DR

The main agent can be unblocked by sending a keystroke to the @main tmux pane, suggesting a potential issue with event handling or input buffering.

Guidance

  • Investigate the event handling mechanism in the main agent to determine why it requires a keystroke to resume processing.
  • Verify that the SendMessage function is correctly implemented and that messages are being delivered to the main agent's inbox as expected.
  • Consider adding a timeout or periodic check to the main agent to automatically resume processing if it becomes stuck.
  • Review the teammateMode settings and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS environment variable to ensure they are correctly configured.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details.

Notes

The root cause of the issue is unclear, but it appears to be related to the interaction between the main agent and the tmux pane. Further investigation is needed to determine the exact cause and develop a permanent fix.

Recommendation

Apply workaround: Press any key in the @main tmux pane when it appears stuck, as this immediately unblocks processing. This is a temporary solution until the root cause can be identified and addressed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The @main agent should automatically resume processing when teammate messages are delivered to its inbox. No human keypress should be required.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING