claude-code - 💡(How to fix) Fix Windows: Bash/PowerShell tool calls flash visible conhost window [2 comments, 3 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#58606Fetched 2026-05-14 03:43:56
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2cross-referenced ×2

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

Error Message

Error Messages/Logs

Root Cause

Root Cause (suspected)

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

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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"
  4. 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

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