mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
## Why Callers need to interrupt a specific active turn without discarding queued input. Tool callbacks must be able to await the interruption decision without blocking task cancellation. ## What changed - Add `CodexThread::interrupt_if_no_pending_input` and `Op::InterruptIfNoPendingInput`. - Check the turn identity and pending user input or mailbox items before taking the active task. Leave the turn running for stale or abandoned requests. - Acknowledge the decision before joining cancellation, and unblock pending submissions when the active task is cancelled. ## Testing Add regression coverage for successful interruption, stale turns, preservation of queued user input and agent mail, abandoned requests, and cancellation while the submission queue is full. GitOrigin-RevId: 42e31c09369fb070ba1b4b3c64ef45334dd872d8
codex-protocol
This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex app-server.
This crate should have minimal dependencies.
Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.