From a354ba576a8d5f6d52c554400da250ed94425bfd Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 27 May 2026 12:42:14 -0700 Subject: [PATCH] Ungate idle lifecycle from goals feature --- .../src/request_processors/thread_goal_processor.rs | 9 +-------- .../src/request_processors/thread_lifecycle.rs | 8 ++------ .../src/request_processors/thread_processor.rs | 5 ++++- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/codex-rs/app-server/src/request_processors/thread_goal_processor.rs b/codex-rs/app-server/src/request_processors/thread_goal_processor.rs index 1762eaedcb..fe18ea611a 100644 --- a/codex-rs/app-server/src/request_processors/thread_goal_processor.rs +++ b/codex-rs/app-server/src/request_processors/thread_goal_processor.rs @@ -56,18 +56,11 @@ impl ThreadGoalRequestProcessor { .map(|()| None) } - pub(crate) async fn emit_resume_goal_snapshot_and_continue( - &self, - thread_id: ThreadId, - thread: &CodexThread, - ) { + pub(crate) async fn emit_resume_goal_snapshot(&self, thread_id: ThreadId) { if !self.config.features.enabled(Feature::Goals) { return; } self.emit_thread_goal_snapshot(thread_id).await; - // App-server owns resume response and snapshot ordering, so wait until - // those are sent before letting extensions start idle work. - thread.continue_idle_extension_work().await; } pub(crate) async fn pending_resume_goal_state( diff --git a/codex-rs/app-server/src/request_processors/thread_lifecycle.rs b/codex-rs/app-server/src/request_processors/thread_lifecycle.rs index dddddeb514..86d4af6711 100644 --- a/codex-rs/app-server/src/request_processors/thread_lifecycle.rs +++ b/codex-rs/app-server/src/request_processors/thread_lifecycle.rs @@ -596,9 +596,7 @@ pub(super) async fn handle_pending_thread_resume_request( } } - if pending.emit_thread_goal_update { - conversation.emit_thread_resume_lifecycle().await; - } + conversation.emit_thread_resume_lifecycle().await; let ThreadConfigSnapshot { model, @@ -669,9 +667,7 @@ pub(super) async fn handle_pending_thread_resume_request( .await; // App-server owns resume response and snapshot ordering, so wait until // replay completes before letting extensions start idle work. - if pending.emit_thread_goal_update { - conversation.continue_idle_extension_work().await; - } + conversation.continue_idle_extension_work().await; } pub(super) async fn send_thread_goal_snapshot_notification( diff --git a/codex-rs/app-server/src/request_processors/thread_processor.rs b/codex-rs/app-server/src/request_processors/thread_processor.rs index 5a2e1a4de8..512f91132b 100644 --- a/codex-rs/app-server/src/request_processors/thread_processor.rs +++ b/codex-rs/app-server/src/request_processors/thread_processor.rs @@ -2727,8 +2727,11 @@ impl ThreadRequestProcessor { .await; } self.thread_goal_processor - .emit_resume_goal_snapshot_and_continue(thread_id, codex_thread.as_ref()) + .emit_resume_goal_snapshot(thread_id) .await; + // App-server owns resume response and snapshot ordering, so wait + // until those are sent before letting extensions start idle work. + codex_thread.continue_idle_extension_work().await; } Err(err) => { let error = internal_error(format!("error resuming thread: {err}"));