TUI: use Esc Esc to cancel, and Esc Esc to clear prompt when input is non empty
Open 💬 5 comments Opened Mar 12, 2026 by CreepyGnome
What variant of Codex are you using?
CLIwhat
What feature would you like to see?
Summary
In Codex CLI, single Esc is too easy to trigger accidentally and can cancel MCP startup, generation, or other in progress work.
Requested behavior
- If the prompt is empty:
Esc Esc cancels the current in progress action.
- If the prompt contains text:
Esc Esc clears the whole prompt.
Why this matters
- Single
Escis easy to hit by accident. - It can interrupt agent work or startup unexpectedly.
- It prevents shell level
Escsequences from working naturally. Esc Escis a safer interaction pattern for terminal UIs.
Current behavior
A single Esc cancels work such as MCP loading or agent thinking.
Expected behavior
Use double tap Esc for interrupt behavior.
Use the same Esc Esc gesture to clear the current prompt when the input field is non empty.
Environment
- OS: macOS 26.2
- Terminal: iTerm.app 3.6.6
- Codex version: codex-cli 0.114.0
Additional information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗