Move sandbox preparation into platform backends (#62317)

## What changed

Have `SandboxManager` handle backend selection and shared preparation, then
delegate command wrapping and session setup to the Linux, macOS Seatbelt,
Windows token, and Windows MXC backends.

Centralize Windows managed proxy routing in `codex-sandboxing` so the exec
server and other callers use the same rule for selecting dedicated MXC
listeners.

GitOrigin-RevId: a75886809aefebf6c267bb39dbc104f76bda3409
This commit is contained in:
viyatb-oai
2026-11-18 17:09:03 +00:00
committed by copyberry
parent daa59ebd29
commit 6257fbc4bd
13 changed files with 405 additions and 299 deletions
@@ -1,8 +1,8 @@
use super::*;
use codex_core::exec_env::inject_apply_patch_env;
use codex_core::windows_sandbox::local_binding_policy_for_sandbox;
use codex_core::windows_sandbox::managed_proxy_routing_for_windows_sandbox;
use codex_protocol::shell_environment::is_non_inheritable_env_var;
use codex_sandboxing::managed_proxy_routing_for_windows_sandbox;
#[derive(Clone)]
pub(crate) struct CommandExecRequestProcessor {