From 58952e0c398f4e088740d8f748a746fe315f464a Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sat, 21 Nov 2026 05:26:57 +0000 Subject: [PATCH] Enable concurrent reasoning summaries by default (#62903) ## What changed Mark `concurrent_reasoning_summaries` as stable and enable it by default. When requesting reasoning summaries from OpenAI, Codex now sets `stream_options.reasoning_summary_delivery` to `sequential_cutoff` by default. ## Testing Exercise summary rendering with the default configuration and update request assertions and snapshots to expect `sequential_cutoff`. Explicitly disable the feature in tests that exercise legacy reasoning events. GitOrigin-RevId: 04310fd271ced11c3a22e8ff6275a387c9c22fc2 --- ...ample__sample_inherits_parent_context.snap | 1 + codex-rs/core/tests/suite/client.rs | 3 --- codex-rs/core/tests/suite/codex_delegate.rs | 4 ++++ codex-rs/core/tests/suite/items.rs | 20 +++++++++---------- .../core/tests/suite/realtime_conversation.rs | 4 ++++ ...dormant_in_a_new_chat_until_first_use.snap | 1 + ...proval_headings_follow_selected_model.snap | 1 + ...og_denied_reads_follow_selected_model.snap | 1 + ..._writable_roots_follow_selected_model.snap | 1 + ...rchestrator_connector_request_history.snap | 4 ++-- ...g_refresh_preserves_tools_and_history.snap | 1 + ...tions__incremental_model_instructions.snap | 1 + ...inator_catalog_instructions_and_tools.snap | 1 + codex-rs/features/src/lib.rs | 4 ++-- .../reasoning_defaults_tests.rs | 6 +++--- 15 files changed, 33 insertions(+), 20 deletions(-) diff --git a/codex-rs/app-server/tests/suite/v2/snapshots/all__suite__v2__thread_sample__sample_inherits_parent_context.snap b/codex-rs/app-server/tests/suite/v2/snapshots/all__suite__v2__thread_sample__sample_inherits_parent_context.snap index 44cec7ae21..ac9183dd80 100644 --- a/codex-rs/app-server/tests/suite/v2/snapshots/all__suite__v2__thread_sample__sample_inherits_parent_context.snap +++ b/codex-rs/app-server/tests/suite/v2/snapshots/all__suite__v2__thread_sample__sample_inherits_parent_context.snap @@ -14,6 +14,7 @@ Settings: service_tier: "priority" store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" -- request 1 (turn) -- 00:additional_tools/developer (3; hash=ba5ddd25650ac9fa): diff --git a/codex-rs/core/tests/suite/client.rs b/codex-rs/core/tests/suite/client.rs index bcb4ea1a9a..6ce91ac94a 100644 --- a/codex-rs/core/tests/suite/client.rs +++ b/codex-rs/core/tests/suite/client.rs @@ -3027,9 +3027,6 @@ async fn configured_reasoning_summary_is_sent() -> anyhow::Result<()> { let TestCodex { codex, .. } = test_codex() .with_config(|config| { config.model_reasoning_summary = Some(ReasoningSummary::Concise); - let _ = config - .features - .enable(Feature::ConcurrentReasoningSummaries); }) .build(&server) .await?; diff --git a/codex-rs/core/tests/suite/codex_delegate.rs b/codex-rs/core/tests/suite/codex_delegate.rs index c42a628c4d..fce60f1495 100644 --- a/codex-rs/core/tests/suite/codex_delegate.rs +++ b/codex-rs/core/tests/suite/codex_delegate.rs @@ -56,6 +56,10 @@ async fn codex_delegate_ignores_legacy_deltas(explicit_guardian: bool) { mount_sse_sequence(&server, vec![sse_stream]).await; let mut builder = test_codex().with_config(move |config| { + config + .features + .disable(Feature::ConcurrentReasoningSummaries) + .expect("disable concurrent summaries"); if explicit_guardian { config.guardian_model_provider = Some(Arc::new(GuardianInferenceProvider { id: "guardian".to_string(), diff --git a/codex-rs/core/tests/suite/items.rs b/codex-rs/core/tests/suite/items.rs index 980cd325c7..b05632a0c5 100644 --- a/codex-rs/core/tests/suite/items.rs +++ b/codex-rs/core/tests/suite/items.rs @@ -1164,7 +1164,15 @@ async fn reasoning_content_delta_has_item_metadata() -> anyhow::Result<()> { let server = start_mock_server().await; - let TestCodex { codex, .. } = test_codex().build(&server).await?; + let TestCodex { codex, .. } = test_codex() + .with_config(|config| { + config + .features + .disable(Feature::ConcurrentReasoningSummaries) + .expect("disable concurrent summaries"); + }) + .build(&server) + .await?; let stream = sse(vec![ ev_response_created("resp-1"), @@ -1209,15 +1217,7 @@ async fn sequential_cutoff_renders_done_summaries_for_active_reasoning_item() -> let server = start_mock_server().await; - let TestCodex { codex, .. } = test_codex() - .with_config(|config| { - config - .features - .enable(Feature::ConcurrentReasoningSummaries) - .expect("test config should allow feature update"); - }) - .build(&server) - .await?; + let TestCodex { codex, .. } = test_codex().build(&server).await?; let summary_done = |item_id: &str, summary_index: i64, text: &str| { serde_json::json!({ "type": "response.reasoning_summary_text.done", diff --git a/codex-rs/core/tests/suite/realtime_conversation.rs b/codex-rs/core/tests/suite/realtime_conversation.rs index 1e66267aae..5b62b08af7 100644 --- a/codex-rs/core/tests/suite/realtime_conversation.rs +++ b/codex-rs/core/tests/suite/realtime_conversation.rs @@ -4571,6 +4571,10 @@ async fn conversation_relays_only_public_reasoning_as_quiet_status(enabled: bool config.realtime.version = RealtimeWsVersion::V3; config.model_reasoning_summary = Some(codex_protocol::config_types::ReasoningSummary::None); + config + .features + .disable(Feature::ConcurrentReasoningSummaries) + .expect("disable concurrent summaries"); } }); let test = builder.build_with_streaming_server(&api_server).await?; diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__cached_stdio_stays_dormant_in_a_new_chat_until_first_use.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__cached_stdio_stays_dormant_in_a_new_chat_until_first_use.snap index d776f3c985..bab33bef8e 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__cached_stdio_stays_dormant_in_a_new_chat_until_first_use.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__cached_stdio_stays_dormant_in_a_new_chat_until_first_use.snap @@ -13,6 +13,7 @@ Settings: reasoning: {"summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" tools (11; hash=067d271a36f2eb01): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=24f4b6739dd5d940 diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_approval_instructions__catalog_approval_headings_follow_selected_model.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_approval_instructions__catalog_approval_headings_follow_selected_model.snap index 15e1bd5659..a03d07cc35 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_approval_instructions__catalog_approval_headings_follow_selected_model.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_approval_instructions__catalog_approval_headings_follow_selected_model.snap @@ -14,6 +14,7 @@ Settings: reasoning: {"context":"all_turns","summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" -- request 1 (turn) -- 00:additional_tools/developer (2; hash=fb72c6881199d93a): diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_denied_reads_follow_selected_model.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_denied_reads_follow_selected_model.snap index 51677074ca..d94dad4a4d 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_denied_reads_follow_selected_model.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_denied_reads_follow_selected_model.snap @@ -13,6 +13,7 @@ Settings: reasoning: {"context":"all_turns","summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" -- request 1 (request) -- 00:additional_tools/developer (2; hash=ba09b4f2f05f1575): diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_writable_roots_follow_selected_model.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_writable_roots_follow_selected_model.snap index d129654a14..86d75ada53 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_writable_roots_follow_selected_model.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__catalog_writable_roots_follow_selected_model.snap @@ -13,6 +13,7 @@ Settings: reasoning: {"context":"all_turns","summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" -- request 1 (request) -- 00:additional_tools/developer (2; hash=ba09b4f2f05f1575): diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap index ec59189afc..c12239883b 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap @@ -22,7 +22,7 @@ Scenario: Guardian reviews a host-owned orchestrator connector, then the parent 03:message/user: List today's calendar events. -## Window 2 (after request 1: input diverged at item 00, settings changed (model, parallel_tool_calls, prompt_cache_key, reasoning, text, tool_choice, tools)) +## Window 2 (after request 1: input diverged at item 00, settings changed (model, parallel_tool_calls, prompt_cache_key, reasoning, stream_options, text, tool_choice, tools)) -- request 2 (request) -- 00:additional_tools/developer (0; hash=09612b07b5ecb5a5): 01:message/developer: @@ -87,7 +87,7 @@ Scenario: Guardian reviews a host-owned orchestrator connector, then the parent [07] >>> APPROVAL REQUEST END -## Window 3 (after request 2: input diverged at item 00, settings changed (model, parallel_tool_calls, prompt_cache_key, reasoning, text, tool_choice, tools)) +## Window 3 (after request 2: input diverged at item 00, settings changed (model, parallel_tool_calls, prompt_cache_key, reasoning, stream_options, text, tool_choice, tools)) -- request 3 (request) -- 00:message/developer: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_catalog_refresh_preserves_tools_and_history.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_catalog_refresh_preserves_tools_and_history.snap index fec4764764..da2bb90067 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_catalog_refresh_preserves_tools_and_history.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_catalog_refresh_preserves_tools_and_history.snap @@ -13,6 +13,7 @@ Settings: reasoning: {"effort":"medium","summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" tools (6; hash=6d27d4ee152c61c9): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=24f4b6739dd5d940 diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__incremental_model_instructions.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__incremental_model_instructions.snap index 9ddb53cb62..67b80dd7c2 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__incremental_model_instructions.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__incremental_model_instructions.snap @@ -13,6 +13,7 @@ Settings: reasoning: {"context":"all_turns","summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" -- request 1 (turn) -- 00:additional_tools/developer (2; hash=86ed27a8ce319b21): diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__originator_catalog_instructions_and_tools.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__originator_catalog_instructions_and_tools.snap index 727124b445..6dd16c873d 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__originator_catalog_instructions_and_tools.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__model_instructions__originator_catalog_instructions_and_tools.snap @@ -13,6 +13,7 @@ Settings: reasoning: {"summary":"auto"} store: false stream: true + stream_options: {"reasoning_summary_delivery":"sequential_cutoff"} tool_choice: "auto" tools (6; hash=04baa2cc544b973a): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=24f4b6739dd5d940 diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index 1d6ca1dfe8..e9083b8367 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -2148,8 +2148,8 @@ pub const FEATURES: &[FeatureSpec] = &[ FeatureSpec { id: Feature::ConcurrentReasoningSummaries, key: "concurrent_reasoning_summaries", - stage: Stage::UnderDevelopment, - default_enabled: false, + stage: Stage::Stable, + default_enabled: true, }, FeatureSpec { id: Feature::OutputTokenReplay, diff --git a/codex-rs/tui/src/app_server_session/reasoning_defaults_tests.rs b/codex-rs/tui/src/app_server_session/reasoning_defaults_tests.rs index 8909026d58..fd19f2cd18 100644 --- a/codex-rs/tui/src/app_server_session/reasoning_defaults_tests.rs +++ b/codex-rs/tui/src/app_server_session/reasoning_defaults_tests.rs @@ -14,7 +14,7 @@ async fn reasoning_defaults_reach_responses() -> Result<()> { ( "", json!("concise"), - json!(null), + json!({"reasoning_summary_delivery": "sequential_cutoff"}), ThreadParamsMode::Embedded, ), ( @@ -32,7 +32,7 @@ async fn reasoning_defaults_reach_responses() -> Result<()> { ( "model_reasoning_summary = 'detailed'", json!("detailed"), - json!(null), + json!({"reasoning_summary_delivery": "sequential_cutoff"}), ThreadParamsMode::Embedded, ), ( @@ -50,7 +50,7 @@ async fn reasoning_defaults_reach_responses() -> Result<()> { ( "model_reasoning_summary = 'detailed'\nmodel_verbosity = 'high'\nweb_search = 'live'", json!("detailed"), - json!(null), + json!({"reasoning_summary_delivery": "sequential_cutoff"}), ThreadParamsMode::Remote, ), ] {