diff --git a/codex-rs/app-server/src/request_processors/turn_processor.rs b/codex-rs/app-server/src/request_processors/turn_processor.rs index eb8d0ca8b2..efa53889ae 100644 --- a/codex-rs/app-server/src/request_processors/turn_processor.rs +++ b/codex-rs/app-server/src/request_processors/turn_processor.rs @@ -482,7 +482,7 @@ impl TurnRequestProcessor { // still queued together with the input below to preserve submission order. if has_any_overrides { thread - .validate_thread_settings_overrides(CodexThreadSettingsOverrides { + .preview_thread_settings_overrides(CodexThreadSettingsOverrides { cwd: cwd.clone(), workspace_roots: runtime_workspace_roots.clone(), approval_policy, diff --git a/codex-rs/core/src/codex_thread.rs b/codex-rs/core/src/codex_thread.rs index 0ccf0dac32..d833af7d11 100644 --- a/codex-rs/core/src/codex_thread.rs +++ b/codex-rs/core/src/codex_thread.rs @@ -266,14 +266,6 @@ impl CodexThread { self.codex.session.preview_settings(&updates).await } - pub async fn validate_thread_settings_overrides( - &self, - overrides: CodexThreadSettingsOverrides, - ) -> ConstraintResult<()> { - self.preview_thread_settings_overrides(overrides).await?; - Ok(()) - } - async fn thread_settings_update( &self, overrides: CodexThreadSettingsOverrides, diff --git a/codex-rs/core/src/session/handlers.rs b/codex-rs/core/src/session/handlers.rs index 36400ba5ab..a62ec88c69 100644 --- a/codex-rs/core/src/session/handlers.rs +++ b/codex-rs/core/src/session/handlers.rs @@ -189,32 +189,24 @@ pub(super) async fn user_input_or_turn_inner( op: Op, mirror_user_text_to_realtime: Option<()>, ) { - let (items, updates, responsesapi_client_metadata, emit_thread_settings_applied) = match op { - Op::UserInput { - items, - environments, - final_output_json_schema, - responsesapi_client_metadata, - thread_settings, - } => { - let emit_thread_settings_applied = - thread_settings != ThreadSettingsOverrides::default(); - let mut updates = if emit_thread_settings_applied { - thread_settings_update(sess, thread_settings).await - } else { - SessionSettingsUpdate::default() - }; - updates.final_output_json_schema = Some(final_output_json_schema); - updates.environments = environments; - ( - items, - updates, - responsesapi_client_metadata, - emit_thread_settings_applied, - ) - } - _ => unreachable!(), + let Op::UserInput { + items, + environments, + final_output_json_schema, + responsesapi_client_metadata, + thread_settings, + } = op + else { + unreachable!(); }; + let emit_thread_settings_applied = thread_settings != ThreadSettingsOverrides::default(); + let mut updates = if emit_thread_settings_applied { + thread_settings_update(sess, thread_settings).await + } else { + SessionSettingsUpdate::default() + }; + updates.final_output_json_schema = Some(final_output_json_schema); + updates.environments = environments; let Ok(current_context) = sess.new_turn_with_sub_id(sub_id.clone(), updates).await else { // new_turn_with_sub_id already emits the error event.