Windows: child processes (gh, git, bash) briefly flash visible console windows

Resolved 💬 3 comments Opened May 14, 2026 by ladousek Closed May 18, 2026

Summary

On Windows, every time Claude Code executes a Bash tool call, child processes (gh.exe, git.exe, bash.exe) spawn a conhost.exe that briefly flashes a visible console window before closing. This happens for every single command — parallel calls (e.g. multiple gh pr view at once) produce multiple simultaneous flashing windows.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Claude Code version: 2.1.138
  • Terminal: Warp (also reproducible in other terminals)

Steps to Reproduce

  1. Run Claude Code on Windows
  2. Ask Claude to run any Bash tool call (e.g. git status, gh pr view, etc.)
  3. Observe a console window briefly appearing and disappearing on the taskbar/screen

Expected Behavior

Child processes run silently in the background with no visible window flash.

Actual Behavior

Each child process spawns a conhost.exe without the CREATE_NO_WINDOW flag, causing a console window to briefly appear. Verified via process monitor:

gh.exe (PID 27232) | parent: claude.exe (25804)
conhost.exe (PID 42440) | parent: gh.exe (27232)   ← visible, not --headless

PowerShell tool calls use --headless correctly and do not flash. The issue is specifically with bash.exe/sh.exegh.exe/git.exe chains spawned by the Bash tool.

Root Cause

When spawning child processes on Windows, the CREATE_NO_WINDOW creation flag (0x08000000) is not set. Console subsystem executables (.exe compiled as IMAGE_SUBSYSTEM_WINDOWS_CUI) always create a console window unless explicitly suppressed by the parent via this flag.

Suggested Fix

When spawning child processes on Windows, pass CREATE_NO_WINDOW (or equivalent — e.g. Node.js child_process.spawn option windowsHide: true) to suppress the console window.

// Node.js example
spawn('git', ['status'], { windowsHide: true })

Impact

Every Bash tool call is visually disruptive on Windows. Users running multiple active Claude Code sessions simultaneously experience continuous window flashing, making it difficult to work alongside Claude.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗