From b622a1c85081e4b16cf503cb459c4b09e42698aa Mon Sep 17 00:00:00 2001 From: jif-oai Date: Wed, 15 Oct 2025 12:10:32 +0100 Subject: [PATCH] RV5 --- codex-rs/core/src/unified_exec/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codex-rs/core/src/unified_exec/mod.rs b/codex-rs/core/src/unified_exec/mod.rs index c60ad64755..e34cf699fe 100644 --- a/codex-rs/core/src/unified_exec/mod.rs +++ b/codex-rs/core/src/unified_exec/mod.rs @@ -215,6 +215,12 @@ impl UnifiedExecSessionManager { use_shell_profile: false, }; + // Ensure the executor's environment reflects this turn before planning + executor.update_environment( + context.turn.sandbox_policy.clone(), + context.turn.cwd.clone(), + ); + let plan: ExecutionPlan = executor .prepare_execution_plan( execution_request,