diff --git a/codex-rs/core/src/exec.rs b/codex-rs/core/src/exec.rs index 47f8183cf8..0be3e109ce 100644 --- a/codex-rs/core/src/exec.rs +++ b/codex-rs/core/src/exec.rs @@ -225,7 +225,7 @@ pub(crate) async fn execute_exec_env( let ExecEnv { command, cwd, - env, + mut env, expiration, sandbox, windows_sandbox_level, @@ -234,6 +234,10 @@ pub(crate) async fn execute_exec_env( arg0, } = env; + if let Some(network) = network.as_ref() { + network.apply_to_env(&mut env); + } + let params = ExecParams { command, cwd,