github / github/copilot-cli

Copilot CLI terminal freezes when a stdio MCP child crashes mid-call

オープン
#3,067 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:input-keyboard area:mcp area:platform-windows
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

# Bug: Copilot CLI terminal freezes when a stdio MCP child crashes mid-call

## What happens

When a stdio MCP child process crashes during an in-flight tool call, the **host Copilot CLI terminal becomes fully unresponsive** — keystrokes, mouse, and **Ctrl+C are all ignored**. Only force-closing the Windows Terminal tab or killing `pwsh.exe` recovers it. Reproduced twice in a row on Windows 11; affected tabs stay frozen indefinitely.

## Repro

A reliable trigger today is the WorkIQ MCP server, which has a deterministic `msalruntime.DLL` crash during concurrent token-refresh ([microsoft/work-iq#113](https://github.com/microsoft/work-iq/issues/113)):

1. `/plugin install workiq@work-iq`
2. Authenticate, then issue several `workiq-ask_work_iq` calls in parallel.
3. The WorkIQ child crashes (visible as `Application Error` in the Windows event log: `workiq.exe`, `msalruntime.DLL`, exception `0xc000027b`).
4. The Copilot CLI terminal hangs — no input accepted, including Ctrl+C.

## Why it matters

A misbehaving plugin should never be able to take the host CLI hostage. **Ctrl+C must always cancel the in-flight tool call** and return control to the prompt, regardless of child-process state.

## Likely cause

Host appears to do a blocking read on the child's stdout for a JSON-RPC response, and never notices process death / EOF. Concurrent calls compound the issue — multiple in-flight requests all become unresolvable after a single child crash.

## Environment

- Copilot CLI 1.0.40-3, Node v24.14.1
- Windows 11 + Windows Terminal + PowerShell 7
- Repro MCP: `@microsoft/workiq` 0.4.1.19742 (stdio, via npx)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reproducing the freeze with the WorkIQ stdio MCP server and parallel tool calls, then inspect the Copilot CLI's stdio child-call handling around process exit, EOF, and Ctrl+C. Done means a crashed child returns control to the prompt, Ctrl+C cancels the in-flight call, and concurrent requests do not leave the terminal unresponsive.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js, powershell, shell
領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。