diff --git a/codex-rs/app-server-client/src/lib.rs b/codex-rs/app-server-client/src/lib.rs index b7a958eff1..0786bf2301 100644 --- a/codex-rs/app-server-client/src/lib.rs +++ b/codex-rs/app-server-client/src/lib.rs @@ -167,6 +167,7 @@ pub(crate) fn server_notification_requires_delivery(notification: &ServerNotific | ServerNotification::ThreadSettingsUpdated(_) | ServerNotification::ItemCompleted(_) | ServerNotification::ExternalAgentConfigImportCompleted(_) + | ServerNotification::CurrentTimeSleep(_) | ServerNotification::AgentMessageDelta(_) | ServerNotification::PlanDelta(_) | ServerNotification::ReasoningSummaryTextDelta(_) @@ -2192,6 +2193,17 @@ mod tests { ) ) )); + assert!(event_requires_delivery( + &InProcessServerEvent::ServerNotification( + codex_app_server_protocol::ServerNotification::CurrentTimeSleep( + codex_app_server_protocol::CurrentTimeSleepNotification { + thread_id: "thread".to_string(), + sleep_id: "sleep".to_string(), + duration_ms: 1_000, + }, + ) + ) + )); assert!(!event_requires_delivery(&InProcessServerEvent::Lagged { skipped: 1 })); diff --git a/codex-rs/app-server/src/in_process.rs b/codex-rs/app-server/src/in_process.rs index 938d539a9f..e20c6d9c1e 100644 --- a/codex-rs/app-server/src/in_process.rs +++ b/codex-rs/app-server/src/in_process.rs @@ -107,6 +107,7 @@ fn server_notification_requires_delivery(notification: &ServerNotification) -> b ServerNotification::TurnCompleted(_) | ServerNotification::ThreadSettingsUpdated(_) | ServerNotification::ExternalAgentConfigImportCompleted(_) + | ServerNotification::CurrentTimeSleep(_) ) } @@ -731,6 +732,7 @@ mod tests { use super::*; use codex_app_server_protocol::ClientInfo; use codex_app_server_protocol::ConfigRequirementsReadResponse; + use codex_app_server_protocol::CurrentTimeSleepNotification; use codex_app_server_protocol::ExternalAgentConfigImportCompletedNotification; use codex_app_server_protocol::SessionSource as ApiSessionSource; use codex_app_server_protocol::ThreadStartParams; @@ -904,5 +906,12 @@ mod tests { }, ) )); + assert!(server_notification_requires_delivery( + &ServerNotification::CurrentTimeSleep(CurrentTimeSleepNotification { + thread_id: "thread-1".to_string(), + sleep_id: "sleep-1".to_string(), + duration_ms: 1_000, + }) + )); } }