From de62c162d45b3145310cfa222e2ec52ee9f19d9f Mon Sep 17 00:00:00 2001 From: Philippe Date: Wed, 22 Jul 2026 21:19:12 +0200 Subject: [PATCH 1/2] fix(buzz-acp): suppress agent console window on Windows (CREATE_NO_WINDOW) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The desktop spawns buzz-acp with CREATE_NO_WINDOW (managed_agents/runtime.rs), so the harness has no console to share. AcpClient::spawn launched the agent subprocess without the flag, so every console-subsystem agent child on Windows — the `claude-agent-acp`/ `goose` cmd shim, node, `claude.exe` — got a fresh visible console window that lingered. External adapters (Claude Code) hit this; the GUI-subsystem bundled `buzz-agent` did not. Mirror the desktop's suppression at the harness spawn: set CREATE_NO_WINDOW on Windows, alongside the existing #[cfg(unix)] process_group(0). stdio pipes are unaffected. Signed-off-by: Philippe Co-authored-by: Claude Opus 4.8 --- crates/buzz-acp/src/acp.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/buzz-acp/src/acp.rs b/crates/buzz-acp/src/acp.rs index b553adaabb..cd580a324b 100644 --- a/crates/buzz-acp/src/acp.rs +++ b/crates/buzz-acp/src/acp.rs @@ -466,6 +466,17 @@ impl AcpClient { #[cfg(unix)] cmd.process_group(0); + // Windows: the desktop layer spawns THIS harness with CREATE_NO_WINDOW + // (see managed_agents/runtime.rs), so buzz-acp has no console to share. + // Without the same flag here, every console-subsystem agent child — the + // `claude-agent-acp`/`goose` cmd-shim, node, `claude.exe` — gets a fresh + // visible console window that lingers. Mirror the desktop's suppression. + #[cfg(windows)] + { + const CREATE_NO_WINDOW: u32 = 0x0800_0000; + cmd.creation_flags(CREATE_NO_WINDOW); + } + let mut child = cmd.spawn()?; let stdin = child From 5da374ad09754d5975d60b1fd4cfd74582a70956 Mon Sep 17 00:00:00 2001 From: Philippe Date: Wed, 22 Jul 2026 22:58:10 +0200 Subject: [PATCH 2/2] fix(buzz-agent): suppress MCP-server console window on Windows (CREATE_NO_WINDOW) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same systemic gap as the buzz-acp fix, in the sibling harness: buzz-agent is spawned by the desktop with CREATE_NO_WINDOW (managed_agents/runtime.rs), so it has no console to share. But spawn_one() in mcp.rs launches each MCP server subprocess without that flag, so every console-subsystem MCP server child on Windows — a `node` stdio server, a cmd shim — gets a fresh visible console window that lingers. This hits any node-based MCP server added to a buzz-agent. Mirror the desktop's suppression at the MCP spawn, alongside the existing #[cfg(unix)] process_group(0). tokio::process::Command::creation_flags is inherent on Windows. Signed-off-by: Philippe Co-authored-by: Claude Opus 4.8 --- crates/buzz-agent/src/mcp.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/buzz-agent/src/mcp.rs b/crates/buzz-agent/src/mcp.rs index 71c3193a06..3629f889bf 100644 --- a/crates/buzz-agent/src/mcp.rs +++ b/crates/buzz-agent/src/mcp.rs @@ -732,6 +732,16 @@ async fn spawn_one( #[cfg(unix)] cmd.process_group(0); + // Windows: the desktop spawns the agent with CREATE_NO_WINDOW, so buzz-agent has no console + // to share. Without the same flag here, every console-subsystem MCP server child — a `node` + // stdio server, a cmd shim — gets a fresh visible console window that lingers. Mirror the + // desktop's suppression at the MCP spawn, alongside the existing #[cfg(unix)] process_group(0). + #[cfg(windows)] + { + const CREATE_NO_WINDOW: u32 = 0x0800_0000; + cmd.creation_flags(CREATE_NO_WINDOW); + } + let transport = TokioChildProcess::new(cmd) .map_err(|e| AgentError::Mcp(format!("spawn {}: {e}", spec.name)))?; let pgid = transport.id();