[BUG] Agent Teams: Lead agent requires manual stdin input to process teammate notifications — breaks unattended orchestration
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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?
- 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.
- 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
- Load a project with an agent orchestration submodule (like our brain plugin).
- Start a session with Agent Teams enabled.
- Trigger a task where a teammate must report back to the orchestrator.
- Teammate sends SendMessage(to="team-lead") upon completion.
- Notification appears in terminal as a teammate-message block.
- Lead Agent (brain) does NOT process it automatically.
- User must press Enter for brain to read the notification and continue the flow.
- 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_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗