Skip to content

Conversation

@rasmusrygaard
Copy link
Contributor

Motivation

  • Ensure codex exec exits when a running turn is interrupted (e.g., Ctrl-C) so the CLI is not "immortal" when websockets/streaming are used.

Description

  • Return CodexStatus::InitiateShutdown when handling EventMsg::TurnAborted in exec/src/event_processor_with_human_output.rs so human-output exec mode shuts down after an interrupt.
  • Treat protocol::EventMsg::TurnAborted as CodexStatus::InitiateShutdown in exec/src/event_processor_with_jsonl_output.rs so JSONL output mode behaves the same.
  • Applied formatting with just fmt.

Testing

  • Ran just fmt successfully.
  • Ran cargo test -p codex-exec; many unit tests ran and the test command completed, but the full test run in this environment produced 35 passed, 11 failed where the failures are due to Landlock sandbox panics and 403 responses in the test harness (environmental/integration issues) and are not caused by the interrupt/shutdown changes.

Codex Task

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Feb 3, 2026
@rasmusrygaard rasmusrygaard merged commit e3d3901 into main Feb 3, 2026
36 of 38 checks passed
@rasmusrygaard rasmusrygaard deleted the dev/rasmus/codex-fix-exec-issue-with-websockets branch February 3, 2026 22:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

codex oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants