From e9ce24859f095ded8d02ce45ec3c0c7fa4f4afec Mon Sep 17 00:00:00 2001 From: anais Date: Mon, 15 Jun 2026 14:09:46 -0700 Subject: [PATCH] merge rollout and indexed thread metadata --- codex-rs/thread-store/src/local/read_thread.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/codex-rs/thread-store/src/local/read_thread.rs b/codex-rs/thread-store/src/local/read_thread.rs index 02cd4413e5..79a1cef630 100644 --- a/codex-rs/thread-store/src/local/read_thread.rs +++ b/codex-rs/thread-store/src/local/read_thread.rs @@ -49,10 +49,17 @@ pub(super) async fn read_thread( .await; let mut thread = stored_thread_from_sqlite_metadata(store, metadata).await; if !params.include_history || rollout_thread.is_some() { - if !params.include_history - && let Some(mut rollout_thread) = rollout_thread + if let Some(mut rollout_thread) = rollout_thread && !rollout_thread.preview.is_empty() { + if params.include_history { + if !thread.preview.is_empty() { + rollout_thread.preview = thread.preview; + } + if thread.first_user_message.is_some() { + rollout_thread.first_user_message = thread.first_user_message; + } + } if thread.name.is_some() { rollout_thread.name = thread.name; }