fix thread-store active archived fallback

This commit is contained in:
Dylan Hurd
2026-05-01 03:11:36 -07:00
parent 48791920a8
commit 5020581e70
@@ -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)
}