[Windows] Option to suppress console windows for child processes spawned by the CLI (Bash tool, npm/npx, plugins)
Resolved 💬 2 comments Opened Jun 3, 2026 by Lukshm Closed Jun 7, 2026
Environment
- OS: Windows 11 Pro (10.0.26200)
- Claude Code CLI: native signed binary at
C:\Users\<user>\.local\bin\claude.exe - Shells in use: PowerShell + Git Bash; npm/npx; a third-party plugin (claude-mem)
Problem
On Windows, child processes the CLI spawns flash a visible console window. Live process inspection shows the offending spawns are:
cmd.exe /d /s /c <script>from npm runbash.exe -c ...from the Claude Code Bash tool- npx invocations
- plugin subprocesses (e.g. claude-mem)
When running Claude Code in a headless / agent-fleet style (repeated tool invocations), these windows flood the desktop continuously and make the machine hard to use.
What I ruled out
- No Claude Code setting or
CLAUDE_*env var appears to suppress spawned console windows (checked~/.claude/settings.jsonand the documented env surface). - The downstream spawners are outside user control: npm's
cmd.exeshell-out has nowindowsHideknob; the nativeclaude.execan't be patched/re-signed (and would be overwritten on auto-update). - No OS-wide "hide all consoles" setting exists; per-process wrappers (nircmd / RunHiddenConsole) are fragile against transient children.
Requested feature
A first-class way for the CLI to create child processes with the window hidden on Windows. Any of:
- A setting (e.g.
settings.json→windowsHideConsole: true) and/or env var (CLAUDE_WINDOWS_HIDE_CONSOLE=1) that makes the CLI passwindowsHide: true(Nodechild_process) /CREATE_NO_WINDOWto all processes it spawns — including the Bash tool, npm/npx, and plugin subprocesses. - Defaulting to
windowsHide: truefor internal spawns on Windows, since a visible console is rarely desired for tool-driven subprocesses. - Guidance / an API for plugins to inherit a hidden-window spawn policy.
Impact
High for headless / agent-fleet usage on Windows: without this, the desktop is unusable during active agent work. A native option here is the durable fix; local wrappers are brittle and break on auto-update.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗