From bc6d9ef6fc326447f1d0d70536586ea6cbcdd4d7 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Wed, 14 Jan 2026 09:28:25 +0000 Subject: [PATCH] feat: only source shell snapshot if the file exists (#9197) --- codex-rs/core/src/tools/runtimes/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codex-rs/core/src/tools/runtimes/mod.rs b/codex-rs/core/src/tools/runtimes/mod.rs index 38bfaebe6..044173bfb 100644 --- a/codex-rs/core/src/tools/runtimes/mod.rs +++ b/codex-rs/core/src/tools/runtimes/mod.rs @@ -58,6 +58,10 @@ pub(crate) fn maybe_wrap_shell_lc_with_snapshot( return command.to_vec(); }; + if !snapshot.path.exists() { + return command.to_vec(); + } + if command.len() < 3 { return command.to_vec(); }