[FEATURE]: Option to disable Escape-to-abort in the VS Code extension (Agent Manager / chat)
Problem
In the VS Code extension, pressing Escape while a session is busy aborts/interrupts the running agent task. This includes pressing Escape in the prompt input box of Agent Manager sessions.
Current behavior
- Escape→abort is hardcoded in the webview: a global
documentkeydown listener inwebview-ui/src/components/chat/ChatView.tsxplus a handler inPromptInput.tsxthat callsession.abort(). - The CLI TUI's
session_interruptkeybind intui.jsoncdoes not affect the VS Code extension; webview key handling is isolated from VS Code-level keybindings (see #6973), so there is no user-side workaround. - I verified the latest
packages/kilo-vscode/package.json(contributes.configuration, v7.5.15): no setting exists to control Escape behavior.
Requested change
Add a configuration option to disable or remap the Escape-to-abort behavior in the extension webview, for example:
- a boolean setting like
kilo-code.new.abortOnEscape(defaulttrueto preserve current behavior), or - a "session interrupt key" setting (default
escape,noneto disable), mirroring the TUI'ssession_interruptkeybind.
Environment
- VS Code extension: Kilo Code v7.5.x
- Windows 11
Would a double escape setting not make more sense here? So that an abort requires to esc presses?
In those cases: 'dismiss a dialog, cancel a rename, or clear focus' the agent should not abort, so I am wondering what the reproducing case here is?
Finally you mention 'work cannot be resumed'. Which work cannot be resumed? Do you have an example.
Thanks, much appreciated.
TL;DR Try Kilo Code KB Patch extension on VS Marketplace or Open VSX
A state-based split has worked better for me than a timing-based one:
Escapeaborts only when the chat box is emptyEscapewith text in the box dismisses an open autocomplete and does nothing elseShift+Escapealways aborts
The appeal over a double tap is that the signal is the state you are already in: if you have typed something, you are mid-compose, so an abort is unlikely to be what you meant. It also keeps one deliberate key for the intentional abort. Spaces and newlines do not count as text.
On reproducing cases, two older reports cover this ground, both auto-closed by the stale bot rather than decided:
- #8080: the
@or/menu is open when a permission request arrives, andEscapeto close the menu denies the permission. - #9271: the abort leaves the prompt on screen. @imanolmzd-svg noted there that "when the chat area is focused, it breaks, but when it's not, it works fine", which is the same focus and state dependency.
That routing is what the Kilo Code KB Patch extension does today (also available on OpenVSX), in case it is useful as a reference before a native setting lands.
A clarification and an apology regarding the original report.
The statement that interrupted work "cannot be resumed" was an unsupported inference — exaggerated wording that got into this issue while it was drafted with AI assistance. I should not have included it, and the issue body has been updated to remove it. Sorry for the confusion the claim caused.
For accuracy: aborting sends a cooperative stop signal that ends the current turn; the session itself remains and can be continued by sending a follow-up message — the interrupted turn just does not resume on its own.
On the reproducing case: the main scenario in which this causes real trouble is accidental Escape presses while switching between and operating across multiple windows.