/clear and /restart breaks mcp integration
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
/clear and /restart leave MCP tools broken; only /mcp reload recovers them
Description
After running /clear (and also /restart), MCP tools stop working correctly in the new session. Restarting the CLI process from scratch (full exit + relaunch) works fine, so the issue is isolated to in-process session/state carryover — not the MCP server config itself. Running /mcp reload after /clear or /restart fixes it without needing a full process exit.
Steps to reproduce
- Start a session with MCP servers configured and working.
- Use MCP tools normally — confirm they work.
- Run /clear.
- Try to use an MCP tool — it fails / tools are unavailable.
- Run /restart — issue persists.
- Run /mcp reload — MCP tools work again.
- Alternatively, fully exit and relaunch the CLI — works fine on first try.
Expected behavior
/clear and /restart should leave MCP tools in the same working state as a fresh CLI launch, without requiring a manual /mcp reload.
Environment
- Copilot CLI version: 1.0.83
- OS: Linux
- Related: possibly same root cause as #4697 (/clear doesn't terminate previous stdio MCP server child processes)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、ここで説明されている /clear、/restart、/mcp reload コマンドの処理と、プロセス内の MCP セッション/状態のライフサイクルを追跡します。これらの経路を新しい CLI の起動および関連する issue #4697 と比較します。/mcp reload を必要とせず、/clear と /restart の後も MCP ツールを利用できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100