github / github/copilot-cli

MCP server processes not killed on CLI exit

未关闭
#2,817 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
area:mcp
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

_No response_

### Affected version

_No response_

### Steps to reproduce the behavior

Body: After exiting copilot, ssh-mcp (and other MCP) child processes remain alive in Activity Monitor. Each
consumes ~tens of MB. Expected behavior: CLI should send SIGTERM to all spawned MCP child processes on exit.
Steps to reproduce: 1. Start copilot with SSH MCP servers configured. 2. Exit with Ctrl+D or /exit. 3. Run
pgrep -la mcp — processes still alive.

### Expected behavior

_No response_

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

首先,在配置了 SSH MCP 服务器的情况下通过 copilot CLI 重现该问题,使用 Ctrl+D 和 /exit 退出,然后使用 `pgrep -la mcp` 检查剩余进程。跟踪 CLI 入口点的关闭流程和 MCP 子进程的处理;完成标准是所有生成的 MCP 进程都收到 SIGTERM,并且退出后不再残留。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。