From 2bf1c986f92542ca73298867195855872a237a6a Mon Sep 17 00:00:00 2001 From: Vivian Fang Date: Mon, 1 Jun 2026 10:13:56 -0700 Subject: [PATCH] [codex] Inherit raw events for spawned child listeners (#25603) --- .../src/request_processors/thread_processor.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 1e8444d1b..3e55fe92c 100644 --- a/codex-rs/app-server/src/request_processors/thread_processor.rs +++ b/codex-rs/app-server/src/request_processors/thread_processor.rs @@ -2380,6 +2380,7 @@ impl ThreadRequestProcessor { thread_id: ThreadId, connection_ids: Vec, ) { + let mut raw_events_enabled = false; if let Ok(thread) = self.thread_manager.get_thread(thread_id).await { let config_snapshot = thread.config_snapshot().await; let loaded_thread = build_thread_from_snapshot( @@ -2389,16 +2390,21 @@ impl ThreadRequestProcessor { thread.rollout_path(), ); self.thread_watch_manager.upsert_thread(loaded_thread).await; + if let Some(parent_thread_id) = config_snapshot.parent_thread_id { + raw_events_enabled = self + .thread_state_manager + .thread_state(parent_thread_id) + .await + .lock() + .await + .experimental_raw_events; + } } for connection_id in connection_ids { log_listener_attach_result( - self.ensure_conversation_listener( - thread_id, - connection_id, - /*raw_events_enabled*/ false, - ) - .await, + self.ensure_conversation_listener(thread_id, connection_id, raw_events_enabled) + .await, thread_id, connection_id, "thread",