codex - 💡(How to fix) Fix Add confirmation or double-press behavior for Ctrl+C interrupt in Codex CLI

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

Press Ctrl+C again to stop Codex.

---

Stop current Codex response? [y/N]

---

[interaction]
confirm_interrupt = true
interrupt_mode = "double-ctrl-c"
RAW_BUFFERClick to expand / collapse

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+C once: show a warning
  • Press Ctrl+C again 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Add confirmation or double-press behavior for Ctrl+C interrupt in Codex CLI