Windows: PowerShell/Bash tool-call windows pop up and steal focus, especially during scheduled/background task execution

Open 💬 0 comments Opened Jul 3, 2026 by pmadara

On Windows 11, every Bash/PowerShell tool call spawns a powershell.exe process that opens a visible console window. This happens even for tool calls issued by scheduled tasks running in the background — the window pops up and steals focus from whatever I'm actively working on, which is disruptive.

I checked settings.json and couldn't find any option to suppress this (no CREATE_NO_WINDOW/-WindowStyle Hidden equivalent, and defaultShell only affects !-prefixed input-box commands, not tool-call shells).

Request: an option to run tool-call shells (Bash/PowerShell) without a visible console window on Windows — at minimum for scheduled/background task execution, since there's no reason those should ever grab focus on the desktop.

Environment: Windows 11 Pro, gh CLI 2.92.0, Claude Code (desktop/CLI).

View original on GitHub ↗