Session hangs after work appears complete; Escape recovery enters permanent "Cancelling"
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
### Describe the bug
After a turn appears to finish its work, the CLI can hang in a busy/thinking state and never return to a usable prompt. The session is already stuck before any user intervention.
Pressing **Escape** to try to recover from that stuck state makes things worse: the UI transitions into a permanent **`Cancelling`** state. Once there, normal input and slash commands stop working entirely, and the only recovery is killing and restarting the process.
This report covers two compounding failures:
1. **Post-completion hang** — the session does not return to the prompt after work appears complete
2. **Escape recovery failure** — pressing Escape while stuck enters permanent `Cancelling` instead of recovering
### Known observations
- visible work appeared complete, but the CLI did not return to a normal ready prompt
- after the session remained stuck for a while, pressing **Escape** moved the UI into **`Cancelling`**
- once in that state, normal input and slash commands no longer worked
- the session had to be restarted/killed to recover
### Observed sequence
1. Start an interactive Copilot CLI session.
2. In at least one observed case, the session remained busy for a long time.
3. The visible work appeared complete, but the CLI did not return to a normal ready prompt.
4. After waiting and seeing no recovery, press **Escape** to try to recover or cancel the stuck state.
5. The UI switches to **`Cancelling`** and does not recover.
6. Normal input and slash commands no longer work.
**Reproduction status:** Intermittent. No minimal deterministic repro is known yet. The conditions that trigger the initial post-completion hang have not been isolated.
### Expected behavior
When work is complete, the CLI should reliably return to a usable prompt instead of remaining stuck in a busy state.
If **Escape** is pressed after the session is already stuck, it should either:
- cleanly recover or cancel, or
- safely no-op while preserving input
It should not transition into a permanent **`Cancelling`** state that disables further interaction.
### Affected version
GitHub Copilot CLI **1.0.25**
### Environment
- **OS:** Linux
### Potentially relevant context (not confirmed triggers)
- observed in an interactive / non-autopilot session
- the session may have involved background work or sub-agent activity, but that has **not** been isolated as the trigger
- the primary failure appears to be the post-completion stuck state; the failed Escape recovery appears to be a secondary consequence
### Related issues / lineage
- **#405** — strongest older precedent for sessions hanging after task completion
- **#2617** — narrower adjacent post-completion stale-status report that was closed as fixed in v1.0.21
- **#2557** and **#2502** — similar stuck-`Cancelling` outcomes, but during active cancellation rather than after an already-stuck post-completion state
- **#2681** — related Esc/input-state restoration bug on a different path
Issues in this symptom family were closed as fixed through v1.0.21, but this was observed on v1.0.25. The exact relationship is still uncertain.
贡献指南
调研方向
Start with an interactive Copilot CLI session on Linux and reproduce the reported sequence: wait for apparent completion, then press Escape while the session remains busy. Trace the transition into Cancelling and compare it with the post-completion hang described here. Done means the CLI returns to a usable prompt after work completes, and Escape either recovers safely or leaves input usable.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- linux, shell
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100