conhost window flash despite `--headless` flag on Windows
Description
On Windows, the Claude Code desktop app periodically spawns short-lived conhost.exe child processes for internal background work (likely MCP server health checks, plugin runtime probes, or similar). Despite the --headless flag in the conhost command line, a small console window briefly flashes on screen at the top z-order before disappearing. The flash is visually distracting and consistently appears in the same screen location regardless of the active foreground app.
Environment
- OS: Windows 11 build 26200.8328
- Claude desktop app: 1.6608.2.0 (
C:\Program Files\WindowsApps\Claude_1.6608.2.0_x64__pzs8sxrjxfjjc) - MCP servers connected: multiple (computer-use, Claude_in_Chrome, Claude_Preview, scheduled-tasks, ccd_, plugin_, mcp-registry, etc.)
Diagnostic detail
When the flash appears, a conhost.exe process is spawned with the following command line:
\?\C:\windows\system32\conhost.exe --headless --width 80 --height 24 --signal <hex> --server <hex>
Confirmed via Get-CimInstance Win32_Process:
ProcessId: e.g. 34400 (varies)ParentProcessId:claude.exeCreationDate: matches the visual flash timestamp within ~1 second
Expected behaviour
The --headless flag should produce no visible window — the spawn should be entirely background, with no visual artefact.
Actual behaviour
A console window briefly appears (sub-second duration, but visually noticeable), then disappears. Consistently at the same screen position. Occurs at top z-order — placing another window over the flash location does not mask it (the conhost window appears above all other windows on creation).
Reproduction
- Run Claude Code desktop app on Windows 11
- Connect multiple MCP servers
- Observe the screen during normal Claude usage
- Flashes will occur intermittently (irregular cadence; observed several per hour during active sessions)
Workarounds tried
- Window position masking (placing another window over the flash location): does not work; the spawned conhost appears at top z-order regardless.
- Reducing connected MCP servers: likely reduces frequency but doesn't eliminate the underlying behaviour.
Suggested investigation angle
The --headless flag is the right intent. The visible flash suggests a brief gap between window creation and the headless behaviour applying. Possible mitigations from the spawning side:
- Set
STARTF_USESHOWWINDOWinSTARTUPINFO.dwFlagsandSW_HIDEinSTARTUPINFO.wShowWindowwhen invokingCreateProcessfor the helper. - Pass
CREATE_NO_WINDOWin thedwCreationFlagsparameter. - Consider the ConPTY API for finer-grained control over console host visibility.
Impact
Cosmetic, not functional. Aggregate impact on user experience for active multi-MCP sessions is meaningful — the flashes occur frequently enough to be distracting during focused work, and the consistent screen position makes them harder to ignore than a randomly-placed artefact would be.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗