Skip to content

Ctrl-D in  ask_user /elicitation form fields triggers session shutdown and discards in-progress input #4866

Closed

Description

@cthorman

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:

  1. Have the agent call a tool that shows an  ask_user  form with a free-text field.
  2. Start typing a multi-line/long answer into the field.
  3. Press Ctrl-D (e.g. out of habit, to delete a character).
  4. 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

Activity

  1. added theissue type on Sep 15, 2026
  2. Ivan-Johnson commented on Sep 23, 2026

    @Ivan-Johnson

    I'm able to reproduce the issue on NixOS (Linux) with Copilot CLI version 1.0.88

  3. clearbrief-brian commented on Oct 7, 2026

    @clearbrief-brian

    Still reproduces on 1.0.93 (macOS arm64, iTerm2 3.7.2, zsh). One difference from the original report: I get a decline, not a session shutdown.

    • Pressing Ctrl+D while typing in an ask_user form's "Other" text box triggers the form's Decline binding (the footer shows ctrl+d decline). The form closes and the typed answer is lost. The agent then gets this tool result and carries on without my input: "The user is not available to respond and will review your work later. Work autonomously and make good decisions."
    • Terminals that map forward Delete (⌦) to ^D hit this without anyone pressing Ctrl+D. My iTerm2 profile maps ⌦ to hex 0x04, so the Delete key declines the form from the "Other" box but works as delete-forward in the main prompt.

    Expected: while a form text input has focus, Ctrl+D should delete forward like the main composer (or do nothing), not decline the form.

  4. copilot-cli-bot commented on Nov 13, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.110. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions