github / github/copilot-cli

Escape should cancel the current task and focus the pending queued prompt (not discard it)

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

描述

### Describe the bug

When a task is running and I've already typed/queued a follow-up prompt, pressing **Escape** to cancel the current task just stops everything — the pending (queued) prompt is dropped/ignored rather than being picked up. I expected Escape to cancel the *current* task and then hand control to the pending prompt.

### Current behavior

1. Agent is working on task A.
2. While A runs, I queue a follow-up prompt B (or it's sitting in the input as a pending message).
3. I press **Escape** to interrupt A.
4. The session stops A and goes idle — **B is discarded / not surfaced**. There's no transition to B at all.

### Expected behavior

Pressing **Escape** should:
1. Stop/cancel the currently running task (A), then
2. **Focus the pending queued prompt (B)** — i.e. surface it in the input (ready to edit/submit) or run it — rather than throwing it away.

This makes "interrupt the current thing and pivot to what I just typed" a single, natural Escape action, instead of losing the queued prompt and having to retype it.

### Why this matters

A very common flow is: the agent goes down the wrong path, so you type the correction *while it's still working*, then hit Escape to stop it and pivot. Today that correction is lost on Escape, which is exactly when you most want it preserved.

### Related issues

This is distinct from the existing "cancel queued messages without stopping the current task" requests (#2378, #2055, #1857). This is the opposite direction: **stop the current task but preserve/focus the queued prompt.**

### Environment

- Copilot CLI v1.0.60-0
- macOS, Ghostty terminal

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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