aws / aws/amazon-q-developer-cli

bug: [Windows] empty console windows pop up for every stdio MCP server spawned

Open
#3,856 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

Windows 11 Pro, build 26200

### Expected behaviour

```
When an agent (or subagent) initializes its stdio MCP servers on Windows, the server processes should start silently in the background. No visible console windows should appear.
```

### Actual behaviour

```
On Windows, every stdio MCP server that is launched opens an empty console
window that stays open for the whole lifetime of the server process. The
windows are always blank because the child process's stdin/stdout are piped to
the CLI, so nothing is ever rendered.

One blank window opens per server. When an agent defines multiple MCP servers,
one window opens for each. For example, an agent that defines 9 database MCP
servers produces up to 9 blank windows on a single launch, and subagent
workflows multiply this because several agents each spin up their own servers.

The MCP launcher here is uv/uvx 0.11.23, a native x86_64-pc-windows-msvc .exe
(NOT a .cmd/.bat shim), so the windows are not caused by cmd.exe running a batch
wrapper. They appear even with a native console executable, which points at the
process creation flags used by the CLI when spawning MCP children: they seem to
be spawned without the Win32 CREATE_NO_WINDOW (0x08000000) flag.

Suggested fix: when spawning stdio MCP server child processes on Windows, pass
the CREATE_NO_WINDOW creation flag. In Rust:

#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
command.creation_flags(CREATE_NO_WINDOW);
}
```

https://github.com/user-attachments/assets/d3fbba5c-3646-447c-8054-41ba071960f0

### Steps to reproduce

```
1. On Windows, configure an agent with one or more stdio MCP servers, e.g.:

{
"name": "repro",
"mcpServers": {
"db1": { "command": "uvx", "args": ["postgres-mcp"], "env": { "DATABASE_URI": "postgresql://..." } },
"db2": { "command": "uvx", "args": ["postgres-mcp"], "env": { "DATABASE_URI": "postgresql://..." } }
},
"tools": ["@builtin", "@db1", "@db2"]
}

2. Start a chat with that agent (or trigger a subagent that uses it).
3. Watch the MCP servers initialize.

Result: one empty console window pops up per MCP server and stays open until the
server shuts down.
```

### Environment

```yaml
[q-details]
version = "2.10.0"
hash = "4a65c7cfb5e508a487638f1dccd5675b442e57f3"
date = "2026-06-25T19:15:58Z"

[system-info]
os = "Windows 11 Pro - build 26200"
chip = "13th Gen Intel(R) Core(TM) i7-13700H"
total-cores = 14
memory = "63.68 GB"

[environment]
cli-path = 'C:\Users\...\AppData\Local\Kiro-Cli\kiro-cli.exe'

[mcp-launcher]
uv = "0.11.23 (x86_64-pc-windows-msvc)"
transport = "stdio"
```

Contributor guide

Open the contributing guide

Research direction

Start at the CLI's stdio MCP server spawning entry point and inspect how child processes are created on Windows. Reproduce with multiple stdio servers, apply the stated Windows creation-flag behavior, and verify that no console windows appear while the servers remain functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.