Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions crates/buzz-acp/src/acp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions crates/buzz-agent/src/mcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down