Windows: Bash tool spawns visible console windows that steal focus
Summary
On Windows 11, every time Claude Code executes the Bash tool, it spawns /usr/bin/bash --login -i as a visible console window. This window steals focus from whatever the user is working in, interrupting their workflow.
Steps to Reproduce
- Use Claude Code on Windows 11 with Git Bash installed
- Ask Claude to run any bash command (file read, git operation, test run, etc.)
- A console window appears and steals focus from the active application
Expected Behavior
Bash processes spawned internally by Claude Code should run with CREATE_NO_WINDOW (or equivalent) so they are invisible to the user.
Actual Behavior
A visible /usr/bin/bash --login -i console window appears for every Bash tool call, stealing focus from the user's current application. For agentic sessions with many tool calls, this means dozens of windows flashing up and interrupting work continuously.
Environment
- OS: Windows 11 Pro
- Shell: Git Bash (
/usr/bin/bash) - Claude Code: Desktop app
Workaround Attempted
None effective. The issue is at the process creation level — Claude Code needs to pass CREATE_NO_WINDOW (0x08000000) or STARTF_USESHOWWINDOW with SW_HIDE when spawning bash processes on Windows.
Impact
High — makes Claude Code very disruptive to use on Windows when running agentic tasks with multiple tool calls.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗