github / github/copilot-cli

Copilot gets stuck in a cancelling loop after failing to find MCP config

Đang mở
#2,706 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:mcp area:platform-windows area:sessions
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Bug description
When Copilot CLI attempts to locate an MCP configuration (e.g., via `/mcp` slash command or related logic) and fails, it can enter a repeated/cancelling loop in the terminal. After searching various default locations for the MCP config, if nothing is found, the tool sits in a 'Cancelling' state and fails to exit gracefully—even after the operation is manually aborted.

#### Steps to reproduce
1. Run a Copilot CLI command that depends on an MCP config in an environment where no such config is available.
2. Observe Copilot searching for config locations (VS Code workspace, user settings, roaming profiles, etc.).
3. If the config is not found, abort or let the operation fail.
4. See that the CLI enters a persistent 'Cancelling' state and does not exit cleanly.

#### Expected behavior
- Copilot CLI should recognize when no MCP config can be found and exit gracefully, reporting a clear error message.
- Cancelling should actually terminate the operation with no loop.

#### Actual behavior
- Operation appears to be cancelled by the user, but CLI gets stuck in a 'Cancelling' loop and does not return to a usable prompt.

### Screenshot
Terminal with stuck Cancelling loop

### Environment
- Copilot CLI version: (see bottom-left of screenshot, e.g., v1.0.16)
- OS: Windows
- Shell: PowerShell

### Additional context
The terminal output shows:
- Copilot searching for MCP config locations.
- Operation aborted by user.
- "Operation cancelled by user."
- Persistent "Cancelling" loop.

This behavior blocks further CLI usage until the terminal session is reset.

**Please fix CLI error handling for missing MCP config so it exits gracefully.**

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.