From 505a6dec6454a883cc8077d55baa22fcb802e309 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 18 May 2026 18:27:29 -0700 Subject: [PATCH 1/2] Wait for accepted thread settings updates --- .../src/request_processors/turn_processor.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 f9bd1ccf5a..da51172754 100644 --- a/codex-rs/app-server/src/request_processors/turn_processor.rs +++ b/codex-rs/app-server/src/request_processors/turn_processor.rs @@ -839,17 +839,12 @@ impl TurnRequestProcessor { "failed to update thread settings: {err}" ))); } - match tokio::time::timeout(THREAD_SETTINGS_ACK_TIMEOUT, thread_settings_applied).await { - Ok(Ok(Ok(payload))) => thread_settings_from_applied_event(&payload), - Ok(Ok(Err(err))) => return Err(invalid_request(err)), - Ok(Err(_)) => { - return Err(internal_error( - "thread settings override waiter was cancelled".to_string(), - )); - } + match thread_settings_applied.await { + Ok(Ok(payload)) => thread_settings_from_applied_event(&payload), + Ok(Err(err)) => return Err(invalid_request(err)), Err(_) => { return Err(internal_error( - "timed out waiting for thread settings overrides to apply".to_string(), + "thread settings override waiter was cancelled".to_string(), )); } } From 654586eda6f921f40fbe38b254248fb92e67ee87 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 18 May 2026 18:31:49 -0700 Subject: [PATCH 2/2] Update TUI thread settings notification matches --- codex-rs/tui/src/app/app_server_event_targets.rs | 2 +- codex-rs/tui/src/chatwidget/protocol.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/tui/src/app/app_server_event_targets.rs b/codex-rs/tui/src/app/app_server_event_targets.rs index aa87eef0fa..d53318018d 100644 --- a/codex-rs/tui/src/app/app_server_event_targets.rs +++ b/codex-rs/tui/src/app/app_server_event_targets.rs @@ -47,7 +47,7 @@ pub(super) fn server_notification_thread_target( ServerNotification::ThreadStatusChanged(notification) => { Some(notification.thread_id.as_str()) } - ServerNotification::ThreadTurnContextUpdated(_) => None, + ServerNotification::ThreadSettingsUpdated(_) => None, ServerNotification::ThreadArchived(notification) => Some(notification.thread_id.as_str()), ServerNotification::ThreadUnarchived(notification) => Some(notification.thread_id.as_str()), ServerNotification::ThreadClosed(notification) => Some(notification.thread_id.as_str()), diff --git a/codex-rs/tui/src/chatwidget/protocol.rs b/codex-rs/tui/src/chatwidget/protocol.rs index fc13ab8d7c..171b039150 100644 --- a/codex-rs/tui/src/chatwidget/protocol.rs +++ b/codex-rs/tui/src/chatwidget/protocol.rs @@ -217,7 +217,7 @@ impl ChatWidget { | ServerNotification::AccountRateLimitsUpdated(_) | ServerNotification::ThreadStarted(_) | ServerNotification::ThreadStatusChanged(_) - | ServerNotification::ThreadTurnContextUpdated(_) + | ServerNotification::ThreadSettingsUpdated(_) | ServerNotification::ThreadArchived(_) | ServerNotification::ThreadUnarchived(_) | ServerNotification::RawResponseItemCompleted(_)