[BUG] StatusLine command repeatedly opens CMD windows on Windows 11
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?
Since approximately 2026-04-29, the statusLine command repeatedly opens CMD (console) windows on Windows 11 every few seconds.
Environment:
- OS: Windows 11 Home (10.0.26200)
- Claude Code: latest channel
- Shell: Git Bash (bash)
What Should Happen?
Expected behavior:
StatusLine command runs silently in the background with no visible console windows.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Configure statusLine in ~/.claude/settings.json with any command (shell script, Python script, etc.)
- Start Claude Code on Windows 11
- Observe CMD windows repeatedly appearing on screen
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.123
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Expected behavior:
StatusLine command runs silently in the background with no visible console windows.
Actual behavior:
A new CMD window appears every few seconds (matching the statusLine refresh interval). This also occurs with hooks
commands.
Workaround:
Setting "disableAllHooks": true stops the CMD windows, confirming the issue is in how Claude Code spawns child
processes for statusLine/hooks. The fix is likely adding windowsHide: true to the Node.js child_process spawn options.
Note:
This behavior started recently and was not present before. It affects both shell scripts and Python scripts as the
statusLine command.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗