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 摘要。