Skip to content

Esc doesn't interrupt the model while it's responding #3607

@billxc

Description

@billxc

Describe the feature or problem you'd like to solve

Pressing Esc while the model is streaming a response does nothing - there is no way to interrupt the model from the keyboard short of killing the CLI.

Proposed solution

Bind Esc (or another clearly documented key) to cancel the in-flight model response and return control to the prompt, similar to how many REPLs handle interrupt. The cancel should stop the model stream immediately, leave the partial response visible in the transcript, and return the user to an editable prompt so they can refine and resend. This would significantly reduce wasted time and tokens on responses the user already knows aren't useful, and is consistent with conventions users expect from interactive terminal tools.

Example prompts or workflows

Common workflows it would enable: ask a large or expensive question, realize partway through that the model is going the wrong direction, press Esc to stop it and refine the prompt; cancel a runaway tool-calling loop with Esc instead of having to close the terminal; stop a verbose code-generation response once the user already sees what they need; interrupt during a slow remote tool call and choose a different approach.

Additional context

Repro: send any prompt that produces a long streaming response, press Esc while the model is still responding. Observed: nothing happens; the response continues to completion. Expected: the response stops and control returns to the prompt. If Esc is reserved for another purpose, any documented keybinding to cancel the in-flight model response would address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text input
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions