[codex] Inherit raw events for spawned child listeners (#25603)

This commit is contained in:
Vivian Fang authored and GitHub committed 2026-06-01 10:13:56 -07:00
1 parent 8b759b9c18
commit 2bf1c986f9
1 file changed
+12 -6
@@ -2380,6 +2380,7 @@ impl ThreadRequestProcessor {
thread_id: ThreadId, thread_id: ThreadId,
connection_ids: Vec<ConnectionId>, connection_ids: Vec<ConnectionId>,
) { ) {
let mut raw_events_enabled = false;
if let Ok(thread) = self.thread_manager.get_thread(thread_id).await { if let Ok(thread) = self.thread_manager.get_thread(thread_id).await {
let config_snapshot = thread.config_snapshot().await; let config_snapshot = thread.config_snapshot().await;
let loaded_thread = build_thread_from_snapshot( let loaded_thread = build_thread_from_snapshot(
@@ -2389,16 +2390,21 @@ impl ThreadRequestProcessor {
thread.rollout_path(), thread.rollout_path(),
); );
self.thread_watch_manager.upsert_thread(loaded_thread).await; 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 { for connection_id in connection_ids {
log_listener_attach_result( log_listener_attach_result(
self.ensure_conversation_listener( self.ensure_conversation_listener(thread_id, connection_id, raw_events_enabled)
thread_id, .await,
connection_id,
/*raw_events_enabled*/ false,
)
.await,
thread_id, thread_id,
connection_id, connection_id,
"thread", "thread",