GeezerVison is showing github.com — [FEATURE]: single-press session abort keybind and /abort; a double Escape read as one key is dropped · Issue #53653 · anomalyco/opencode
[FEATURE]: single-press session abort keybind and /abort; a double Escape read as one key is dropped #53653
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The session.interrupt command itself counts the Escape presses and only aborts on the second one. Rebinding session_interrupt to another key therefore still takes two presses of that key. There is no way to abort with a single press, and there is no /abort slash command either.
Separately, a double Escape is sometimes dropped silently. A terminal sends Escape as a bare ESC byte. When two presses reach the TUI in one read, they parse as one alt+escape key, and three or more parse as a key with no name. Neither matches escape, so the interrupt never counts. This happens when the main thread is busy while the user presses Escape twice, and also with a single tmux send-keys Escape Escape. I reproduced it by stopping the TUI process across both presses: the turn kept running in 6 of 6 tries.
Proposal:
- A
session.abort command that aborts on one press, with its own session_abort keybind. Like any other keybind it accepts several keys, e.g. "alt+escape,ctrl+k". The bindings are active only while the session is running, so a key that is shared with the input keeps its editing meaning when the session is idle.
/abort and a command palette entry for the same command.
- A default of
alt+escape, with a run of three or more ESC bytes also resolved to alt+escape, so a burst of Escape presses aborts instead of being dropped.
Activity
github-actions commented on Oct 7, 2026
This issue might be a duplicate of existing issues. Please check:
- #53652: no feedback is shown after the second Escape while the interrupt is pending.
- #19072: pressing Escape twice does not stop CLI execution.
- #24217: double-Escape interruption loops without stopping the session.
For keybind-related issues, please also check our pinned keybinds documentation: #4997
opencode-agent commented on Oct 7, 2026
Thanks for the detailed report. I reproduced the dropped double-Escape on v2.0.24, the latest release, with a simulated model and a long-running turn:
- Two ESC bytes arriving in one input read (
\x1b\x1b): the session is not interrupted and the turn runs to completion.
- Three ESC bytes in one read (
\x1b\x1b\x1b): same, not interrupted.
- Two separate Escape presses: the turn is interrupted as expected.
This matches what you describe: a burst of Escapes read as one key never reaches the double-press interrupt. The single-press session.abort keybind and /abort command are a feature request, so I've left those for the maintainers to decide on.
Metadata
Metadata
Development
No branches or pull requestsIssue actions