Repository navigation
Description
Summary
In a fresh squad init'd folder running Squad CLI v0.10.0-insider.1 on GitHub Copilot CLI v1.0.63 (Windows), the first tool the assistant tries to invoke (powershell reading .squad/team.md) hangs indefinitely after the preToolUse hook completes successfully. The actual tool process is never spawned, and no tool.execution_complete event is ever emitted.
Reproduced twice in the same session (after Ctrl+C abort, retry hit the identical hang on the very next tool call).
Environment
| Copilot CLI | 1.0.63 |
| Squad CLI | 0.10.0-insider.1 (via npx -y @bradygaster/squad-cli@0.10.0-insider.1 state-mcp) |
| OS | Windows 11 |
| Folder | C:\temp\perception-squad — fresh scaffold, vanilla layout, no custom plugins |
| Model | claude-opus-4.7, effort max, context long_context |
| MCP servers loaded | 8 total: azure-devops, playwright, aspire, enghub, teams (agency), mail (agency), nano-banana, squad_state |
Reproduction
cd C:\temp\perception-squadcopilotto start a fresh session- Wait through MCP startup (all 6 user-level MCPs +
squad_stateemit "taking longer than expected to connect" warnings —squad_statestarts last, ~45s after session start) - Prompt the assistant with anything that should trigger a tool call. In our case:
"hi"→ assistant ranif (Test-Path .squad/team.md) { Write-Host "===TEAM_EXISTS==="; Get-Content .squad/team.md }
Observed behavior
From events.jsonl:
12:31:27 assistant.turn_start
12:31:27 assistant.message (Squad banner)
12:31:27 tool.execution_start (toolName="powershell", reading team.md)
12:31:27 hook.start (preToolUse)
12:31:32 hook.end (preToolUse, success=true)
... silence for ~10 minutes ...
12:41:10 abort (reason="user_initiated" ← Ctrl+C)
No tool.execution_complete event ever fired. The session was retried after abort and hit the identical hang on the very next tool call (same pattern: tool.execution_start → hook.end → silence).
Event tally over 28 minutes of session lifetime:
| Event type | Count |
|---|---|
tool.execution_start |
2 |
tool.execution_complete |
0 |
session.warning (MCP slow-to-connect) |
6 |
| Errors | 0 |
Process-level diagnostic
The hung copilot.exe (PID 63572) was alive (1465s CPU, 188 MB RSS) but no powershell.exe / pwsh.exe child process was ever spawned. All 8 MCP server child processes were alive and idle. The hang is in the CLI's tool dispatch path between hook.end and child_process.spawn(powershell).
Hypothesis
Race condition between Squad CLI's state-mcp initialization (which connects ~45s into the session) and Copilot CLI's tool dispatcher. When many MCPs are still settling, the CLI's post-hook dispatch path may be blocked on an unfulfilled IPC promise.
Possibly a Copilot CLI bug, but the Squad state-mcp is the late-connecting MCP that pushes the session over the edge.
Workaround tested
Reducing the global mcp-config.json from 7 MCPs to 3 (kept: enghub, teams, mail; dropped: aspire, azure-devops, playwright, nano-banana) — pending verification by user.
Asks
- Could
state-mcpstartup be made non-blocking / lazy, only initializing on first tool call? - Is there a known interaction between
preToolUsehooks and parallel MCP initialization in0.10.0-insider.1? - Worth a
--no-state-mcpflag for repro / debugging?
Happy to attach the full events.jsonl (~285 KB) if useful — it's redacted-safe (just protocol events, no message content). Just say the word.
Activity
fix: CLI and upgrade bug fixes (github#1050, github#1048, github#1047, …