Files
codex/codex-cli
Eric Traut e14750e0b9 Preserve the exit summary when Ctrl+C is pressed again on Windows (#65038)
## Why

Once the TUI restores the terminal, another Ctrl+C becomes a Windows
console event and can terminate Codex before it prints the exit summary,
including the resume hint when available. The npm launcher can also
force-terminate the child by forwarding a Ctrl+C that Windows already
delivered to it.

## What changed

Register a Windows Ctrl+C listener before restoring the terminal and keep
it alive until the CLI or standalone TUI finishes printing the exit
summary. Skip forwarding `SIGINT` from the npm launcher on Windows.

## Testing

Add a Windows regression test that simulates `SIGINT` in the npm launcher
and checks that the child can finish and report its own exit code.

GitOrigin-RevId: cd73a4a2ecc22812bc301787e67c349f7720a93b
2026-12-01 17:07:18 +00:00
..
2026-08-21 16:45:05 +00:00