mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## 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