You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npx vitest run hangs when running full test suites via Copilot CLI terminal #3308
Running npx vitest run for a full test suite hangs indefinitely when executed through the GitHub Copilot CLI terminal. The same command works fine in a regular PowerShell/cmd terminal.
Environment
Tool: GitHub Copilot CLI (VS Code)
OS: Windows
Node: v22.14.0
npm: 10.9.2
Vitest: v4.1.2
Reproduction Steps
Open a Copilot CLI terminal session in VS Code
Run npx vitest run
Vitest starts, queues all test files, runs a few, then hangs with no further output
Typically nothing is seen piped back to the session window (the above has been deduced)
What Works
Running a single test file works fine: npx vitest run some.test.ts
Running batches of up to ~10 files works fine
Running with JSON output to file works and completes successfully:
npx vitest run --reporter=json --outputFile=test-results.json
Root Cause
According to copilot which tried to diagnose this:
Vitest's default live reporter continuously rewrites terminal output using ANSI escape sequences (cursor movement, line clearing) for all queued files simultaneously. This high-volume ANSI output appears to overflow or deadlock the Copilot CLI's stdout pipe, causing the process to hang.
Redirecting output to a file bypasses the pipe entirely and the suite completes normally.
Workaround
npx vitest run --reporter=json --outputFile=test-results.json
Suggested Fix
Affected version
vs code 1.120.0
Steps to reproduce the behavior
Open a Copilot CLI terminal session in VS Code
Run npx vitest run
Vitest starts, queues all test files, runs a few, then hangs with no further output
Typically nothing is seen piped back to the session window (the above has been deduced)
This has occurred again, and not for vitest so that may be unrelated. This is what copilot has deduced:
A Copilot CLI session entered a permanent Processing state (for 6+ hours) even though no tool process was still running.
The session event stream ended on a tool start event and never emitted the corresponding tool completion event.
Environment
OS: Windows 11
VS Code: 1.121.0
GitHub Copilot Chat extension: 0.49.0
Session type: Copilot CLI isolated worktree session
Workspace: large TypeScript repo with npm verify scripts
What happened
Session showed Processing indefinitely in the UI.
No active child process remained for the reported command.
Event stream count mismatch: 53 tool starts, 52 tool completions.
Last recorded event was tool.execution_start at 2026-05-26 19:06:41 local time.
No matching tool.execution_complete was ever written for that final tool call.
Expected behavior
Every tool.execution_start should eventually resolve to one terminal state:
tool.execution_complete success, or
tool.execution_complete error, or
explicit cancellation/failure state
UI should not remain in Processing forever when no active process exists.
Actual behavior
UI remained stuck on Processing for hours.
Session did not self-recover or fail fast.
Manual session reset was required.
Repro notes
I cannot provide a guaranteed minimal repro yet, but this occurred during a normal multi-step coding run where the agent executed verification scripts, then continued with follow-up tool calls.
In this incident, the verify command was not the direct hanging point; the wedge happened after a later tool call started and never emitted completion.
Relevant log signals
Session created normally and tracked by OpenTelemetry.
Early warning observed once: failed to get session title due to missing events file ENOENT.
Repeated MCP transport warnings were present in the same window (SSE disconnected), which may be related but are unproven as root cause.
The critical signal is the unmatched lifecycle event: tool start without tool completion.
Impact
Session appears active but is deadlocked.
User cannot distinguish real progress from zombie state.
Wastes significant time and requires manual cleanup.
Can provide on request
Redacted session events stream showing final unmatched tool start.
Redacted extension host log excerpt around the failure window.
Screenshot of stuck Processing UI.
Root cause of the interruptions (from log analysis): The VS Code extension host became unstable in the original session (in-memory DB fallback, .git/config ENOENT, session repeatedly closing/reopening). Both apply_patch calls started but never got execution_complete events — the extension host was killed mid-flight.
This appears to be resolved as of GitHub Copilot CLI v1.0.103. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.
Activity
JackUkleja commentedon May 26, 2026
This has occurred again, and not for vitest so that may be unrelated. This is what copilot has deduced:
A Copilot CLI session entered a permanent Processing state (for 6+ hours) even though no tool process was still running.
The session event stream ended on a tool start event and never emitted the corresponding tool completion event.
Environment
OS: Windows 11
VS Code: 1.121.0
GitHub Copilot Chat extension: 0.49.0
Session type: Copilot CLI isolated worktree session
Workspace: large TypeScript repo with npm verify scripts
What happened
Session showed Processing indefinitely in the UI.
No active child process remained for the reported command.
Event stream count mismatch: 53 tool starts, 52 tool completions.
Last recorded event was tool.execution_start at 2026-05-26 19:06:41 local time.
No matching tool.execution_complete was ever written for that final tool call.
Expected behavior
Every tool.execution_start should eventually resolve to one terminal state:
tool.execution_complete success, or
tool.execution_complete error, or
explicit cancellation/failure state
UI should not remain in Processing forever when no active process exists.
Actual behavior
UI remained stuck on Processing for hours.
Session did not self-recover or fail fast.
Manual session reset was required.
Repro notes
I cannot provide a guaranteed minimal repro yet, but this occurred during a normal multi-step coding run where the agent executed verification scripts, then continued with follow-up tool calls.
In this incident, the verify command was not the direct hanging point; the wedge happened after a later tool call started and never emitted completion.
Relevant log signals
Session created normally and tracked by OpenTelemetry.
Early warning observed once: failed to get session title due to missing events file ENOENT.
Repeated MCP transport warnings were present in the same window (SSE disconnected), which may be related but are unproven as root cause.
The critical signal is the unmatched lifecycle event: tool start without tool completion.
Impact
Session appears active but is deadlocked.
User cannot distinguish real progress from zombie state.
Wastes significant time and requires manual cleanup.
Can provide on request
Redacted session events stream showing final unmatched tool start.
Redacted extension host log excerpt around the failure window.
Screenshot of stuck Processing UI.
JackUkleja commentedon May 26, 2026
possible duplicates:
#3366
#2543
microsoft/vscode#302551
JackUkleja commentedon May 28, 2026
Last thoughts from copilot investigating itself:
Root cause of the interruptions (from log analysis): The VS Code extension host became unstable in the original session (in-memory DB fallback, .git/config ENOENT, session repeatedly closing/reopening). Both apply_patch calls started but never got execution_complete events — the extension host was killed mid-flight.
copilot-cli-bot commentedon Oct 26, 2026
This appears to be resolved as of GitHub Copilot CLI v1.0.103. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.