claude-code - 💡(How to fix) Fix [BUG] StatusLine command repeatedly opens CMD windows on Windows 11 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54590Fetched 2026-04-30 06:41:27
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

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.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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:

  1. Configure statusLine in ~/.claude/settings.json with any command (shell script, Python script, etc.)
  2. Start Claude Code on Windows 11
  3. 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.

extent analysis

TL;DR

Adding windowsHide: true to the Node.js child_process spawn options may fix the issue of repeatedly opening CMD windows on Windows 11.

Guidance

  • Verify that the issue is indeed related to how Claude Code spawns child processes for statusLine/hooks by checking if setting "disableAllHooks": true stops the CMD windows from appearing.
  • Investigate the Node.js child_process spawn options to confirm if windowsHide: true is a valid and applicable solution.
  • Test the proposed fix by adding windowsHide: true to the relevant code and checking if the CMD windows no longer appear.
  • If the issue persists, try to isolate the problem by testing with different shell scripts and Python scripts as the statusLine command.

Example

No code snippet is provided as the issue does not include the relevant code, but the proposed fix would involve modifying the Node.js child_process spawn options, for example:

const childProcess = require('child_process');
childProcess.spawn(command, { windowsHide: true });

Notes

The proposed fix is based on the information provided in the issue and may not be applicable in all cases. The issue seems to be specific to Windows 11 and the latest version of Claude Code.

Recommendation

Apply the workaround by adding windowsHide: true to the Node.js child_process spawn options, as it is likely to fix the issue and has been confirmed to stop the CMD windows from appearing when "disableAllHooks": true is set.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] StatusLine command repeatedly opens CMD windows on Windows 11 [1 comments, 2 participants]