Ctrl-D in ask_user /elicitation form fields triggers session shutdown and discards in-progress input
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
Describe the bug
Summary: In the main prompt composer, Ctrl-D behaves correctly (deletes the character under the cursor when the line is non-empty; only signals EOF/shutdown on an empty line — the behavior fixed some months ago). However, when the agent presents an ask_user elicitation form and I'm typing an answer into a form text field, pressing Ctrl-D immediately triggers "shutdown" and discards everything I'd typed into the form. It appears the non-empty-line guard applied to the main composer's Ctrl-D handler was never applied to the elicitation/form input widget.
Impact: Repeated loss of carefully composed answers (happened ~6 times in one session).
Severity: High — silent data loss of user input; unexpected shutdown.
Suggested fix: Route the form field's Ctrl-D through the same handler/guard as the main composer (non-empty line ⇒ delete-char; empty ⇒ ignore or blur, not global shutdown).
Affected version
Copilot CLI 1.0.83, macOS (darwin-arm64)
Steps to reproduce the behavior
Steps to reproduce:
- Have the agent call a tool that shows an ask_user form with a free-text field.
- Start typing a multi-line/long answer into the field.
- Press Ctrl-D (e.g. out of habit, to delete a character).
- Observe: the session shuts down / the form is torn down and the typed answer is lost.
Expected behavior
Expected: In a form field, Ctrl-D should either delete the character under the cursor (matching the main composer) or be a no-op — it should NOT invoke global shutdown while a non-empty field has focus.
Actual: Ctrl-D invokes global shutdown regardless of field contents, discarding in-progress input.
Additional context
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne beim Textfeldeingabe-Widget des ask_user-Erfassungsformulars und vergleiche dessen Ctrl-D-Behandlung mit dem Haupt-Prompt-Composer, bei dem die Prüfung für nicht leere Zeilen bereits als funktionierend beschrieben ist. Reproduziere das Verhalten mit einem fokussierten Formularfeld und überprüfe anschließend, dass Ctrl-D weder das globale Herunterfahren auslöst noch nicht leere Eingaben verwirft, während das erwartete Verhalten für leere Felder erhalten bleibt.
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
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 58/100