Add explicit mode for interrupting

Open 💬 3 comments Opened Aug 13, 2026 by siddhpant
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

Accidentally pressing Ctrl+C, which can happen when we have many terminals etc. open, causes the run to get interrupted.

We should have a setting to disallow keyboard exit shortcuts and have the user explicit exit or interrupt using /interrupt or /exit. Kind of like using IGNOREEOF in bash.

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 15 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #38053

Powered by Codex Action

jdcodes1 · 9 days ago

Most of the machinery for this already exists — the TUI keymap is user-configurable per action. interrupt_turn is a rebindable binding list (default Esc) resolved from tui.keymap.chat.interrupt_turn (https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/tui/src/keymap.rs#L593-L596, default at #L1109), and Ctrl+C/Ctrl+D quit is already double-press-armed rather than instant (tui/src/chatwidget.rs#L1392).

So the request reduces to two gaps: (1) allow an empty binding list to mean "disabled" for interrupt_turn and the quit shortcut — today the resolver falls back to defaults, so you can rebind but not fully unbind; (2) a /interrupt slash command as the explicit alternative (/exit exists; /interrupt doesn't). With those, [tui.keymap.chat] interrupt_turn = [] plus a quit-shortcut opt-out gives exactly the IGNOREEOF-style behavior — no new subsystems needed.

siddhpant · 9 days ago
Ctrl+C/Ctrl+D quit is already double-press-armed

I want it to be unarmed / do nothing. Double-press is useless for human workflows, a human easily spams the signal in workflows.