claude-code - 💡(How to fix) Fix [BUG] Agent Teams: Lead agent requires manual stdin input to process teammate notifications — breaks unattended orchestration [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#51959Fetched 2026-04-23 07:40:21
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

  1. Load a project with an agent orchestration submodule (like our brain plugin).
  2. Start a session with Agent Teams enabled.
  3. Trigger a task where a teammate must report back to the orchestrator.
  4. Teammate sends SendMessage(to="team-lead") upon completion.
  5. Notification appears in terminal as a teammate-message block.
  6. Lead Agent (brain) does NOT process it automatically.
  7. User must press Enter for brain to read the notification and continue the flow.
  8. Workarounds (None satisfactory)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Context

Project Setup: Production environment using a custom submodule/plugin named brain. Role of brain: Acts as the session's main entry point and agent orchestrator.

Environment Claude Code Version: v2.1.116 / Model: Opus 4.7 (1M context) · Claude Max / OS: macOS / Linux / Shell: zsh / bash / Experimental Flags: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

The Issue When the brain orchestrator delegates tasks to Teammates, the entire session enters a "zombie" state once the teammate completes its work and sends a notification. Even though the notification is visible in the terminal, the Lead Agent (controlled by brain) stays idle. There is no visual feedback indicating that the system is waiting for manual intervention.

Technical Observations Invisible Deadlock: The system is actually waiting for a stdin event (an Enter keypress) to process the teammate's synthetic message into the Lead's context.

Multi-cycle Scaling: The problem compounds in complex remediation loops (e.g., security-qa → fix → quality-gate → pr-governance). Each transition requires a separate manual Enter, making unattended long-running tasks impossible.

UX Failure: The tool looks frozen or crashed. The cursor blinks, but no reasoning or tools are triggered until a manual keypress occurs.

Visual Proof As seen in the attached screenshots, the system stays in an Idle state even after the teammate has finished. The output from @pr-governance only renders after a manual keystroke is detected.

Before keystroke: System is stuck in Idle. <img width="1615" height="217" alt="Image" src="https://github.com/user-attachments/assets/22ff519a-3f72-459d-b9b9-35de010f92ef" />

After keystroke: Teammate message and PR creation process appear instantly. <img width="1605" height="237" alt="Image" src="https://github.com/user-attachments/assets/acf41b2f-7fd0-4fc2-8606-3b5a63900f3f" />

_Manual Enter: Breaks unattended automation and forces "chair-coupling" for the developer.

Running without Agent Teams: Results in loss of parallelism and teammate isolation, which is critical for complex multi-agent systems.

/loop command: Not designed for this specific inter-agent signaling use case and adds unnecessary overhead._

What Should Happen?

  1. Visual State Indicator: If the reasoning loop is paused waiting for a manual trigger to process an agent notification, display: [ACTION REQUIRED] Press Enter to allow 'brain' to process teammate response.

  2. Auto-process Flag: Allow a configuration (via settings.json or CLI flag) to let orchestrators like brain auto-consume teammate notifications without manual stdin events when confidence is high.

Error Messages/Logs

Steps to Reproduce

  1. Load a project with an agent orchestration submodule (like our brain plugin).
  2. Start a session with Agent Teams enabled.
  3. Trigger a task where a teammate must report back to the orchestrator.
  4. Teammate sends SendMessage(to="team-lead") upon completion.
  5. Notification appears in terminal as a teammate-message block.
  6. Lead Agent (brain) does NOT process it automatically.
  7. User must press Enter for brain to read the notification and continue the flow.
  8. Workarounds (None satisfactory)

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

Version: v2.1.116

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by implementing a visual state indicator to notify the user when manual intervention is required to process teammate notifications, and potentially introducing an auto-process flag to automate this step when confidence is high.

Guidance

  • To verify the issue, follow the steps to reproduce provided in the issue description, paying close attention to the behavior of the Lead Agent after a teammate sends a notification.
  • Implementing a visual state indicator, such as "[ACTION REQUIRED] Press Enter to allow 'brain' to process teammate response," can improve the user experience by clearly communicating when manual intervention is needed.
  • Consider introducing a configuration option (via settings.json or CLI flag) to allow orchestrators like 'brain' to auto-consume teammate notifications without manual stdin events when confidence is high, which could mitigate the need for manual intervention.
  • Reviewing the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 experimental flag's impact on the system's behavior might provide insights into potential solutions or workarounds.

Example

No specific code example can be provided without further details on the implementation of the brain plugin and the teammate notification system. However, the visual state indicator could be implemented by modifying the notification handling logic in the brain plugin to display a prompt when waiting for user input.

Notes

The provided information does not specify the exact implementation details of the brain plugin or the teammate notification system, which are crucial for developing a precise fix. The suggestions provided are based on the issue description and might need adjustments based on the actual implementation.

Recommendation

Apply a workaround by implementing a visual state indicator to improve user experience and consider introducing an auto-process flag for automated notification handling when confidence is high. This approach addresses the immediate need for clearer communication of required manual intervention and potentially reduces the reliance on manual keystrokes for workflow continuation.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING