[BUG] Agent team parent hangs waiting for teammate completion without terminal input on Windows
Bug Description
Title: Agent team parent doesn't wake on teammate completion without terminal input (Windows Terminal)
Summary:
When a parent Claude Code session dispatches teammates via TeamCreate + parallel Agent(...) calls and becomes idle waiting for
drain, teammate completion events do NOT wake the parent. Resumption requires a physical input event (mouse click or keypress)
routed to the parent's terminal window. Ruled out: OS focus, foreground state, window visibility, Power Throttling, renderer. Only
direct input resumes the event loop that processes SubagentStop notifications.
Reproduce (reliable, reproduced across multiple sprints):
1. Parent session launched on Windows 11 + Windows Terminal + PowerShell via a workstream-binding launcher script
2. Parent dispatches N teammates in one message: TeamCreate({team_name: "wN"}) + N parallel Agent({team_name: "wN", ...}) calls
3. Parent emits something like "Standing by for teammate drain" and enters idle
4. Teammates complete and terminate successfully (verifiable via filesystem artifacts, git state, observations from other Claude
sessions on the same machine, and the parent's own display showing the teammates went idle)
5. Parent stays frozen — does not proceed to TeamDelete or next wave dispatch
6. Mouse click anywhere in the parent's Windows Terminal tab → parent resumes instantly, processes all accumulated events in order,
fires next step
Ruled out via direct testing (2026-04-20):
- Windows Power Throttling / Efficiency Mode: claude.exe exempted via powercfg /powerthrottling disable, green-leaf icon confirmed
absent; bug still reproduces
- Focus: window was foreground on a second monitor, not occluded, not minimized; bug still reproduces
- Windows Terminal "Always on top": enabled globally via Settings → Appearance; parent observed going idle waiting for teammate,
teammate visibly terminated, parent still did not wake without a click
- Windows Terminal software renderer: toggled on; bug still reproduces
- QuickEdit Mode selection: pressing Esc does nothing; only click/keypress wakes
Process state while frozen (captured via PowerShell Get-Process claude):
- Working set: 697 MB (large-context 1M session)
- Threads: 38 total, distributed as Unknown=32, EventPairLow=4, UserRequest=2 wait reasons
- CPU delta over 5 s sample: ~94 ms (heartbeat only — not hard-frozen, just starved)
- Non-frozen parent in same state but actively working: ~720 ms delta over 5 s for comparison
Environment:
- Windows 11 Pro
- Windows Terminal (latest release channel)
- PowerShell 7.x
- Claude Code CLI at C:\Users\<user>\.local\bin\claude.exe
- Agent teams enabled via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
- Reproduces with both trivial subagent tasks and long-running ones (pytest runs, multi-file edits)
Impact:
Blocks unattended wave-based multi-agent workflows. A typical sprint in this project dispatches 4–8 teammates per wave across 2–6
waves, with the expectation that the parent auto-advances as each wave drains. Each freeze requires an interactive mouse click,
turning a walk-away-friendly workflow into babysitting. Effectively negates the parallel-dispatch speed benefit for wall-clock user
time, since the user must sit at the window to tap between waves.
Hypothesized cause (speculative):
The parent's idle-notification consumer appears to be coupled to the terminal input event queue rather than to the IPC/pipe signal
that teammates emit on completion. Without terminal input events cycling the queue, completion notifications queue up unread. First
input of any kind kicks the consumer, which then drains all pending notifications. This would also explain why render-level changes
(renderer, always-on-top, focus) have no effect — the path gated on input is orthogonal to the display pipeline.
Current workaround:
Click the parent window after each wave. No passive mitigation found.
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.113
- Feedback ID: aeba2e95-829c-42b9-bce0-55b8f21e4811
Errors
[{"error":"Error: Failed to initialize LSP server plugin:powershell-editor-services:powershell: LSP server 'plugin:powershell-editor-services:powershell': shutdownTimeout is not yet implemented. Remove this field from the configuration.\n at f (B:/~BUN/root/src/entrypoints/cli.js:3217:29078)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T04:05:41.803Z"},{"error":"Error: Failed to initialize LSP server plugin:powershell-editor-services:powershell: LSP server 'plugin:powershell-editor-services:powershell': shutdownTimeout is not yet implemented. Remove this field from the configuration.\n at f (B:/~BUN/root/src/entrypoints/cli.js:3217:29078)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T04:06:30.473Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f7…
Note: Content was truncated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗