github / github/copilot-cli

CLI can get stuck on 'Cancelling' and stop accepting Enter (slash commands become unusable)

未關閉
#2,770 1 則留言 9 個 reaction 已指派 0 人 在 GitHub 檢視
area:input-keyboard area:models
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

In some failure cases (seems to correlate with server-side rate limiting / request hang), Copilot CLI becomes unusable after attempting to cancel. The UI input remains responsive (you can type and see autocomplete), but pressing **Enter** stops doing anything — commands like `/restart` and `/session info` cannot be executed.

After pressing **Esc**, the UI shows **"Cancelling"** indefinitely. Esc no longer interrupts, and Enter will not submit commands.

### Steps to reproduce (approx)

1. Submit a prompt that triggers a backend request.
2. Backend appears rate limited / hung; CLI shows no useful feedback for 5+ minutes.
3. Press **Esc** to cancel.
4. Observe: status shows **"Cancelling"** and never completes for a long time.
5. Try `/restart` + Enter or `/session info` + Enter.
6. Observe: the text remains in the input line but **Enter does not execute**.

Eventually (8–10+ minutes later) it “releases” and starts working again, but until then there’s no way to recover.

### Expected behavior

- Cancellation should complete quickly (or time out with a clear failure state).
- Even while a request is cancelling/hung, **Enter should still work** for local slash commands like `/restart`, `/session info`, and ideally a “force cancel” action.
- If the CLI is rate-limited, show actionable feedback (retry-after / backoff) rather than appearing frozen.

### Actual behavior

- Stuck in **"Cancelling"**.
- **Esc** no longer works.
- Input is responsive for typing/autocomplete, but **Enter does not execute** `/restart` or `/session info`.
- Cannot retrieve session info to safely force-quit and resume.

### Environment

- OS: Windows
- Trigger: appears during/after suspected rate limit or hung server connection

### Additional context / suggestions

This feels like an input state machine deadlock where cancellation disables submit/Enter processing globally. Local commands should remain functional regardless of backend request state.

貢獻指南

開啟貢獻指南

研究方向

No files, tests, or entry points are identified in the issue. Reproduce the Windows cancellation flow, then trace how the CLI handles cancellation, Enter submission, and local slash commands. Done means cancellation cannot leave the CLI stuck indefinitely and commands such as /restart and /session info remain usable or receive a clear timeout state.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。