Add confirmation or double-press behavior for Ctrl+C interrupt in Codex CLI
Add confirmation or double-press behavior for Ctrl+C interrupt in Codex CLI
Codex CLI currently stops the active response or task immediately when Ctrl+C is pressed.
This is easy to trigger by mistake, especially when the user intended to paste text or interact with the terminal and accidentally presses Ctrl+C instead. In long-running responses or coding tasks, this can interrupt useful work unintentionally.
It would be helpful if Codex CLI supported a safer interrupt behavior, such as:
- Press
Ctrl+Conce: show a warning - Press
Ctrl+Cagain within a short time window: actually stop the current response/task
Example message:
Press Ctrl+C again to stop Codex.
Alternatively, Codex CLI could ask for confirmation:
Stop current Codex response? [y/N]
Ideally this behavior would be configurable, so users who prefer the current immediate interrupt behavior can keep it.
Possible config example:
[interaction]
confirm_interrupt = true
interrupt_mode = "double-ctrl-c"
This would reduce accidental interruptions while preserving a fast way to stop Codex when needed.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗