Ctrl+C exits via SIGINT (status 130) so TUI skips session summary/resume hint on WSL2

Open 💬 3 comments Opened Jan 18, 2026 by EnvyGithub

What version of Codex is running?

codex-cli 0.87.0

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 (WSL2 on Windows; Windows Terminal)

What issue are you seeing?

In the interactive TUI, pressing Ctrl+C sometimes terminates the process via SIGINT (exit status 130).
When this happens, Codex does not print the session summary / "To continue this session, run codex resume ..." message.

This makes it look like an abnormal exit and loses the resume hint.

Steps to reproduce

  1. Run codex (interactive TUI) inside WSL2.
  2. Send any prompt so token usage is non-zero.
  3. Press Ctrl+C.
  4. Observe that the process exits immediately and echo $? is 130.
  5. Observe that no session summary/resume hint is printed.

Expected behavior

Ctrl+C should be handled by the TUI input handling (like other Ctrl+C paths) and exit gracefully:

  • print session summary / resume hint (when token usage is non-zero)
  • avoid being killed by SIGINT

Workaround

Use /quit or /exit (or Ctrl+D when composer is empty) to exit cleanly.

Additional context

Other parts of the codebase already handle Ctrl+C via tokio::signal::ctrl_c() (e.g. codex-exec and core exec paths),
but the interactive TUI does not appear to listen for SIGINT/ctrl_c, so the process can be terminated before printing exit info.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗