Windows: Bash/PowerShell tool calls flash visible conhost window

Open 💬 6 comments Opened May 13, 2026 by TK-Salto

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description

Every time Claude Code executes a Bash or PowerShell tool call on Windows,
a conhost.exe window briefly flashes visibly on screen.

Root Cause (suspected)

bash.exe/powershell.exe spawned without CREATE_NO_WINDOW flag.

Suggested Fix

Pass CREATE_NO_WINDOW (0x08000000) when spawning shell processes on Windows.

Environment

  • Windows 11, Claude Code 2.1.128+, Git Bash + PowerShell 5.1

What Should Happen?

Should not flash terminal window.

Error Messages/Logs

Steps to Reproduce

  1. Install Claude Code on Windows 11 with Git Bash (git-scm.com) installed
  2. Open Claude Desktop and start a new conversation
  3. Ask Claude to run any shell command, e.g.:

"List files in my home directory"

  1. Observe: a black console window (conhost.exe) briefly flashes

on screen and disappears

Verification

Run this in PowerShell to confirm conhost spawns from claude.exe:

Get-Process conhost | ForEach-Object {
$ppid = (Get-CimInstance Win32_Process -Filter "ProcessId=$($_.Id)").ParentProcessId
[PSCustomObject]@{ PID=$_.Id; Parent=(Get-Process -Id $ppid -EA SilentlyContinue).Name }
}

Expected output during a tool call:
PID Parent
----- ------
13064 claude

Notes

  • Happens with both Bash tool and PowerShell tool
  • Window is visible for ~100–300ms per tool call
  • Does NOT happen with pythonw.exe-based processes (correct behavior)
  • Reproducible on Claude Code 2.1.128 and 2.1.140

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude Code 2.1.128 and 2.1.140

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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