Conversation
Drop prewarm_websocket call from run_sampling_request, relying on startup prewarm only. Update websocket_fallback tests to match reduced websocket attempt count.
Create schedule_startup_prewarm to build the initial turn context, router, prompt and RegularTask, and set it on SessionState. Call this after session setup instead of constructing the prewarm task inline. Also avoid mutating SessionState at creation time.
Convert `ResponsesApiRequest` to an owned, clonable struct and add `From<&ResponsesApiRequest>` for websocket requests. Replace `ResponsesRequest`/`ResponsesRawRequest` with direct use of `ResponsesApiRequest` plus a new `ResponsesOptions` for transport concerns, moving header and compression handling into `ResponsesClient::stream_request`. Update call sites and tests accordingly and expose `attach_item_ids` for reuse.
# Conflicts: # codex-rs/codex-api/src/lib.rs # codex-rs/core/src/client.rs
# Conflicts: # codex-rs/core/src/client.rs # codex-rs/core/src/codex.rs
Switch mention collection to return app IDs directly and use collect_explicit_app_ids in run_turn. Update tests to pass an explicit empty set of enabled connectors.
# Conflicts: # codex-rs/core/src/client.rs
# Conflicts: # codex-rs/core/src/client.rs
…equest # Conflicts: # codex-rs/core/src/codex.rs
Switch `ResponseCreateWsRequest` from `deferred: bool` to optional `defer: Option<bool>` and update all websocket tests and callers accordingly. Add debug logging for websocket append incrementality failures. Change startup prewarm to use `built_tools`, falling back to `ToolRouter::from_config` on error, and update tests to submit turns with explicit sandbox policy.
# Conflicts: # codex-rs/core/src/codex.rs
…quest # Conflicts: # codex-rs/core/src/client.rs # codex-rs/core/src/codex.rs # codex-rs/core/src/tasks/regular.rs # codex-rs/core/tests/suite/client_websockets.rs
Spawn startup prewarm construction on session init, storing a JoinHandle in SessionState. Await and handle errors when taking the startup_regular_task, and simplify RegularTask prewarm handling to store a prewarmed session directly instead of a spawned task.
Co-authored-by: Codex <noreply@openai.com>
Switch websocket request prewarm to v2-only behavior using generate=false, keep v1 prewarm connection-only, and update websocket tests for the new request chaining semantics.\n\nCo-authored-by: Codex <noreply@openai.com>
Inline websocket request handling in ModelClientSession::stream and drop unused send_websocket_request helper. Also remove obsolete module-level doc comment in turn_metadata.
Co-authored-by: Codex <noreply@openai.com>
sayan-oai
approved these changes
Feb 23, 2026
…quest # Conflicts: # codex-rs/core/src/codex.rs
Introduce WebsocketSession to store connection, last request, and last response receiver together and cache this session across ModelClientSession instances. Add test to ensure incremental websocket v2 requests are reused across turns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Send a request with
generate: fallsbut a full set of tools and instructions to pre-warm inference.