From 17ba27ed81a0caec7134581e382f6847037d942f Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Wed, 29 Oct 2025 22:34:01 -0700 Subject: [PATCH] initial_history --- codex-rs/core/src/codex.rs | 4 ++++ codex-rs/core/src/codex_delegate.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index a6af372136..c05f3e8a77 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -625,6 +625,10 @@ impl Session { Ok(sess) } + pub(crate) fn get_prompt_cache_key(&self) -> String { + self.prompt_cache_key.clone() + } + pub(crate) fn get_conversation_id(&self) -> ConversationId { self.conversation_id } diff --git a/codex-rs/core/src/codex_delegate.rs b/codex-rs/core/src/codex_delegate.rs index 27774bcb84..987cc0a0c1 100644 --- a/codex-rs/core/src/codex_delegate.rs +++ b/codex-rs/core/src/codex_delegate.rs @@ -45,7 +45,7 @@ pub(crate) async fn run_codex_conversation_interactive( auth_manager, InitialHistory::New, SessionSource::SubAgent(SubAgentSource::Review), - Some(parent_session.get_conversation_id().to_string()), + Some(parent_session.get_prompt_cache_key()), ) .await?; let codex = Arc::new(codex);