/clear does not terminate previous stdio MCP server child processes (unlike /mcp reload )
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Description
When reloading MCP servers with /mcp reload, the CLI correctly terminates the existing stdio MCP server child process before starting a new one. However, running /clear (start fresh session) spawns a new stdio MCP server process without terminating the previous session's MCP server process, leaking orphaned processes over time.
Steps to reproduce
- Start a session with a stdio-based MCP server configured (e.g. a custom
*.exeMCP server). - Confirm the server process is running (e.g. via Task Manager /
Get-Process). - Run
/clear. - Observe: a new instance of the MCP server process starts, but the previous one is still running.
- Repeat
/clearmultiple times — orphaned process count grows unbounded. - Contrast with
/mcp reload, which correctly stops the old process before starting the new one.
Expected behavior
/clear should terminate/clean up MCP server child processes from the previous session (or reuse them) before/while starting the new session's servers, matching the behavior of /mcp reload.
Actual behavior
Old MCP stdio server processes are left running indefinitely after /clear, accumulating over repeated use (observed 22+ orphaned exe instances in one session).
Environment
- Copilot CLI version: 1.0.82
- OS: Windows
- MCP server type: stdio-based custom MCP server
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイルやテストは指定されていません。Windows 上で stdio MCP server を使って再現し、その後、既存の /mcp の reload クリーンアップパスと並行して /clear のセッションリセットを追跡します。繰り返し実行した /clear コマンドによって以前の MCP 子プロセスが実行中のまま残らず、既存の reload 動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli, operating-systems
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100