mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
Preserve HTTP fallback for delegated sessions (#38681)
## Why Responses WebSocket fallback is session-scoped. A delegated session created after its parent switched to HTTP could otherwise make another WebSocket connection attempt. ## What changed Disable WebSocket support for a delegated session when the parent session has already fallen back to HTTP. ## Testing Add a guardian review regression test that verifies only the parent's initial WebSocket attempt occurs and the guardian request uses the HTTP response path. GitOrigin-RevId: 1345f8fe739f55975aef432045348eae5a9278d6
This commit is contained in:
@@ -66,6 +66,10 @@ pub(crate) async fn run_codex_thread_interactive(
|
||||
));
|
||||
}
|
||||
config.permissions.approval_policy = Constrained::allow_only(AskForApproval::Never);
|
||||
config.model_provider.supports_websockets &= parent_session
|
||||
.services
|
||||
.model_client
|
||||
.responses_websocket_enabled();
|
||||
|
||||
let (tx_sub, rx_sub) = async_channel::bounded(SUBMISSION_CHANNEL_CAPACITY);
|
||||
let (tx_ops, rx_ops) = async_channel::bounded(SUBMISSION_CHANNEL_CAPACITY);
|
||||
|
||||
Reference in New Issue
Block a user