From 1e3584ab5c9c569cd8ba262780fc5291fbb8d53b Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim <219906144+aibrahim-oai@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:19:23 +0000 Subject: [PATCH] codex: fix app-server sandbox setup build on PR #15329 Co-authored-by: Codex --- .../app-server/src/codex_message_processor.rs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index 93aa5bd7a1..213b8cd1ed 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -7212,16 +7212,18 @@ impl CodexMessageProcessor { codex_home: codex_home.clone(), originator_tag: Some(originator().value), }; - run_windows_sandbox_setup(setup_request).await?; - ConfigEditsBuilder::new(codex_home.as_path()) - .with_profile(active_profile.as_deref()) - .set_windows_sandbox_mode(windows_sandbox_mode_tag(mode)) - .clear_legacy_windows_sandbox_keys() - .apply() - .await - .map_err(|err| { - anyhow::anyhow!("failed to persist windows sandbox mode: {err}") - }) + match run_windows_sandbox_setup(setup_request).await { + Ok(()) => ConfigEditsBuilder::new(codex_home.as_path()) + .with_profile(active_profile.as_deref()) + .set_windows_sandbox_mode(windows_sandbox_mode_tag(mode)) + .clear_legacy_windows_sandbox_keys() + .apply() + .await + .map_err(|err| { + anyhow::anyhow!("failed to persist windows sandbox mode: {err}") + }), + Err(err) => Err(err), + } } Err(err) => Err(err.into()), };