From 5020581e701e4c57b01895d9801cfc0b024cec42 Mon Sep 17 00:00:00 2001 From: Dylan Hurd Date: Fri, 1 May 2026 03:11:36 -0700 Subject: [PATCH] fix thread-store active archived fallback --- codex-rs/thread-store/src/local/read_thread.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codex-rs/thread-store/src/local/read_thread.rs b/codex-rs/thread-store/src/local/read_thread.rs index 8b3d3160db..f99ba3bb05 100644 --- a/codex-rs/thread-store/src/local/read_thread.rs +++ b/codex-rs/thread-store/src/local/read_thread.rs @@ -71,6 +71,11 @@ pub(super) async fn read_thread( })?; let mut thread = read_thread_from_rollout_path(store, path).await?; + if !params.include_archived && thread.archived_at.is_some() { + return Err(ThreadStoreError::InvalidRequest { + message: format!("thread {thread_id} is archived"), + }); + } attach_history_if_requested(&mut thread, params.include_history).await?; Ok(thread) }