Hide Windows filesystem helper console windows (#32849)

## What changed

- Add a console mode to the Windows sandbox process launcher.
- Launch `--codex-run-as-fs-helper` subprocesses with `CREATE_NO_WINDOW`.
- Preserve inherited-console behavior for regular sandboxed commands.

GitOrigin-RevId: 927be36b82903b6a5fb1a243ba7f406f9ed85f3f
This commit is contained in:
zm-oai authored and copyberry committed 2026-07-13 18:25:55 +00:00
1 parent 84696e3d57
commit 87f3e39fdf
4 files changed
+33 -1

No files matched your search

+4
View File
@@ -235,6 +235,8 @@ pub use logging::log_writer;
#[cfg(target_os = "windows")]
pub use path_normalization::canonicalize_path;
#[cfg(target_os = "windows")]
pub use process::ConsoleMode;
#[cfg(target_os = "windows")]
pub use process::PipeSpawnHandles;
#[cfg(target_os = "windows")]
pub use process::StderrMode;
@@ -352,6 +354,7 @@ mod windows_impl {
use super::WindowsSandboxCancellationToken;
use super::logging::log_failure;
use super::logging::log_success;
use super::process::ConsoleMode;
use super::process::create_process_as_user;
use super::sandbox_utils::ensure_codex_home_exists;
use super::spawn_prep::LegacyAclSids;
@@ -569,6 +572,7 @@ mod windows_impl {
&env_map,
logs_base_dir,
Some((in_r, out_w, err_w)),
ConsoleMode::Inherit,
use_private_desktop,
)
};