claude-code - 💡(How to fix) Fix conhost window flash despite `--headless` flag on Windows [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57769Fetched 2026-05-11 03:25:53
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

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.

Root Cause

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.

Fix Action

Fix / Workaround

Workarounds tried

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:

Code Example

\?\C:\windows\system32\conhost.exe --headless --width 80 --height 24 --signal <hex> --server <hex>
RAW_BUFFERClick to expand / collapse

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.exe
  • CreationDate: 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

  1. Run Claude Code desktop app on Windows 11
  2. Connect multiple MCP servers
  3. Observe the screen during normal Claude usage
  4. 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_USESHOWWINDOW in STARTUPINFO.dwFlags and SW_HIDE in STARTUPINFO.wShowWindow when invoking CreateProcess for the helper.
  • Pass CREATE_NO_WINDOW in the dwCreationFlags parameter.
  • 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING