Visible cmd.exe windows spawn during npm update checks — disruptive on multi-session setups
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:
Environment
- OS: Windows 11 Pro 10.0.26200
- Claude Code version: 2.1.80
- Shell: Windows Terminal + cmd.exe / bash (Git for Windows)
- Node.js: via C:\Program Files\nodejs\
Bug Description
On Windows, Claude Code periodically spawns visible black cmd.exe popup windows to
perform npm update checks. These windows flash briefly and close, but are visually
disruptive — especially when running multiple Claude Code sessions simultaneously (e.g.
a multi-tab ACP harness setup), where the frequency multiplies linearly with the
number of sessions.
Commands observed spawning visible windows (via Sysinternals Process Monitor):
cmd.exe /q /d /s /c "npm ^"view^" ^"@anthropic-ai/claude-code@latest^" ^"version^""
cmd.exe /c CALL "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\..."
cmd.exe /c "ver"
cmd.exe /d /s /c "where.exe bash"
cmd.exe /d /s /c "echo $PATH"
Impact
- With 1 session: intermittent flashes every few minutes
- With 4 sessions: near-constant flashing, visually indistinguishable from
malware/runaway process behavior
- During investigation, these popups were initially mistaken for a security incident,
requiring ~2 hours of process tracing with Sysinternals Process Monitor to identify the
root cause
What Should Happen?
Expected Behavior
All background operations (update checks, environment detection) should use WindowStyle
Hidden or equivalent (CREATE_NO_WINDOW flag) on Windows so no visible cmd.exe window
appears.
Workaround
None currently available. --no-update-check flag does not exist.
Suggested Fix
When spawning child processes on Windows for background operations, use:
- Node.js: { windowsHide: true } in child_process.spawn() / exec() options
- This is a single-flag fix that would eliminate all visible popups
Error Messages/Logs
2 cmd shell windows pop open every 2min then close. Have done extensive troubleshooting and root cause identified above.
Steps to Reproduce
Not sure
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
na
Claude Code Version
Claude Code version: 2.1.80
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗