diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index 14eee2f3e3..15024f8849 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -3927,10 +3927,9 @@ impl CodexMessageProcessor { let mut thread = build_thread_from_snapshot(thread_id, &config_snapshot, loaded_rollout_path.clone()); - // Temporary live-thread metadata shim: stored-thread metadata is owned by - // ThreadStore, but loaded threads that are not yet readable from the store may - // still have local metadata. Keep this compatibility path centralized here so - // future remote threadstore implementations have one app-server boundary to replace. + // Temporary live-thread metadata shim: loaded threads that are not yet + // readable from the store may still have local metadata, so use it to fill + // summary fields for the live fallback view. let loaded_state_db = loaded_thread.state_db(); let summary = match loaded_state_db.as_ref() { Some(state_db) => { diff --git a/codex-rs/thread-store/src/local/read_thread.rs b/codex-rs/thread-store/src/local/read_thread.rs index 83cba57f1a..fca74b0376 100644 --- a/codex-rs/thread-store/src/local/read_thread.rs +++ b/codex-rs/thread-store/src/local/read_thread.rs @@ -17,6 +17,7 @@ use crate::StoredThreadHistory; use crate::ThreadStoreError; use crate::ThreadStoreResult; +/// Reads a persisted thread by preferring discoverable rollout files, then SQLite metadata for external or legacy rows. pub(super) async fn read_thread( store: &LocalThreadStore, params: ReadThreadParams, @@ -107,6 +108,9 @@ async fn read_thread_from_rollout_path( .ok() .and_then(|meta_line| meta_line.meta.forked_from_id); let mut found_sqlite_title = false; + // This overlay is different from the no-preview fallback above: the rollout + // summary was readable, so SQLite only supplies mutable metadata such as + // user-edited title, git fields, or explicit git-field clears. if let Ok(Some(metadata)) = read_sqlite_metadata(store, thread.thread_id).await { if let Some(title) = distinct_title(&metadata) { found_sqlite_title = true;