Always use private desktops for legacy Windows sandboxes (#46554)

## What changed

- Remove the private-desktop opt-out from elevated and unelevated Windows sandbox launches.
- Remove `windows.sandbox_private_desktop` and its managed requirement and API fields. Warn users to remove the obsolete setting.
- Require a private desktop name when launching through the Windows sandbox wrapper and command runner.

## Testing

Add coverage for the obsolete-setting migration warning and update wrapper tests to verify a live private desktop is passed and a missing desktop name is rejected.

GitOrigin-RevId: c7135f8d211aac8d812180691c2c1e433d77cde4
This commit is contained in:
iceweasel-oai
2026-09-18 21:53:33 +00:00
committed by copyberry
parent c6f5d9e9b5
commit a633ebc124
94 changed files with 179 additions and 680 deletions

View File

@@ -496,7 +496,6 @@ async fn run_command_under_sandbox(
sandbox_exe: Some(codex_self_exe.as_path()),
use_legacy_landlock: false,
windows_sandbox_level: codex_protocol::config_types::WindowsSandboxLevel::Disabled,
windows_sandbox_private_desktop: false,
})?;
let (program, args) = request
.command
@@ -587,7 +586,6 @@ async fn run_command_under_windows_session(
deny_write_paths_override: empty_paths,
tty: false,
stdin_open: true,
use_private_desktop: config.permissions.windows_sandbox_private_desktop,
})
.await;