mirror of
https://github.com/openai/codex.git
synced 2026-10-30 19:18:49 +00:00
## Why A network request can disappear while its approval prompt is still pending. Leaving that prompt active allows a late cancellation to interrupt the turn even though the request no longer needs approval. ## What changed - Track network prompt lifetimes in core and notify the app server when a prompt is resolved or withdrawn. - Cancel the corresponding server request, emit `serverRequest/resolved`, and release its permission guard. Resolve outstanding network prompts during thread shutdown as well. - Claim a live pending approval and validate its originating turn before applying a decision, so stale responses cannot interrupt a turn or persist policy changes. - Distinguish network approvals that require the originating turn from proxy approvals that can be serviced by a later active turn. ## Testing Extend regression coverage for disconnected network requests, late cancellation responses, turn completion during review, shutdown cleanup, mismatched turn IDs, and command approvals from background code running during a later turn. GitOrigin-RevId: 78f656d92607ec21ddd0c5d781ed0947588cb2eb
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.