mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Suppress console windows for local Windows MCP servers (#48238)
## What changed Expose Windows process creation flags on the shared command wrapper and use `CREATE_NO_WINDOW` when launching local stdio MCP servers, including fallback launches without Job Object containment. Preserve `CREATE_SUSPENDED` when assigning the server to a Job Object before execution. ## Testing Add a Windows regression test covering direct launches and launches through `cmd.exe`. Verify that the server has no console, initializes successfully, returns tools, and exits after shutdown. GitOrigin-RevId: 84475e82999d91a431e09327d4f5639b59c01427
This commit is contained in:
committed by
Ian MacLeod
parent
5c3671c1a0
commit
bd5b3b7a20
@@ -233,6 +233,12 @@ impl Command {
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the Windows process creation flags, replacing any previously selected flags.
|
||||
#[cfg(windows)]
|
||||
pub fn creation_flags(&mut self, flags: u32) -> &mut Self {
|
||||
self.inner.creation_flags(flags);
|
||||
self
|
||||
}
|
||||
/// Preserve Job Object assignment before the child begins executing on Windows.
|
||||
#[cfg(windows)]
|
||||
pub fn prepare_suspended_spawn(&mut self, job: &crate::JobObject) {
|
||||
|
||||
Reference in New Issue
Block a user