github / github/copilot-cli

[BUG]: "Operation cancelled by user" is re-injected as a user message after cancelling a turn

Offen
#3,826 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:input-keyboard
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

Type rg --version### What happened?

When I cancel an in-progress turn (Esc / Ctrl-C), the line `Operation cancelled by user` is sent back to the model as if it were a new **user message** (it arrives with its own fresh timestamp). The agent then "replies" to it as though it were a real instruction/content, instead of the cancel simply aborting the current operation silently.

This produces phantom turns: every cancel results in the assistant responding to nothing.

### Expected behavior

Cancelling a turn should abort the current operation and return to the prompt without injecting `Operation cancelled by user` into the conversation as a user turn. The model should not be prompted to respond to it.

### Steps to reproduce

1. Send a prompt that triggers tool calls / a longer operation.
2. Cancel mid-operation (Esc / Ctrl-C).
3. Observe `Operation cancelled by user` appears as a user message with a new timestamp, and the assistant generates a reply addressed to it.

### Notes

- Reported as a regression — a user observed this did not happen in earlier versions.
- Likely related to (but distinct from) the closed #2502 "Stuck in \"Cancelling\" after operation cancelled by user".
- Behavior is client-side and version-dependent, not account- or repo-specific.

### Version

1.0.63

### OS

macOS (Darwin)

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne beim clientseitigen Abbruchpfad für Esc/Ctrl-C und suche nach dem exakten Text `Operation cancelled by user`. Verfolge, wie die Abbruchausgabe zu einer Benutzernachricht wird, und überprüfe anschließend, dass das Abbrechen zum Prompt zurückkehrt, ohne einen Benutzer-Turn zu erstellen oder eine Assistant-Antwort auszulösen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.