You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Add windowsHide option for hooks on Windows #17230
I have searched existing requests and this feature hasn't been requested yet
This is a single feature request (not multiple features)
Problem Statement
When hooks execute on Windows, a CMD console window briefly appears for each hook execution. This creates a poor user experience, especially with hooks like Stop that run after every response
Proposed Solution
Attempted Workarounds (all failed)
PowerShell -WindowStyle Hidden - window still flashes
VBScript wrapper with WshShell.Run ..., 0, True - window still flashes
Batch file with start /b - window still flashes
The root cause is that Claude Code uses child_process to spawn hook commands, which creates a visible cmd.exe window on Windows before the actual command runs.
Proposed Solution
Add a windowsHide option for hooks (similar to what was added in SDK v0.17.1 - see #103 in claude-agent-sdk-typescript).
Example configuration:
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "node script.js",
"windowsHide": true
}]
}]
}
}
Or default windowsHide: true for all hook executions on Windows### Alternative Solutions_No response_### PriorityCritical - Blocking my work### Feature CategoryCLI commands and flags### Use Case Example_No response_### Additional Context_No response_
Reacted by Dawood Saleh, dox187 and António Pedro Malheiro (TóPê)
On Windows, each hook execution creates a visible console window popup, resulting in dozens of flashing windows per session. This makes the plugin (and Claude Code itself) nearly unusable on Windows.
Technical Details:
The issue is that hook spawn calls don't include windowsHide: true. This is standard Node.js practice for Windows:
Plugin ecosystem depends on hooks - Without windowless execution, Windows users can't effectively use plugins
Already solved in claude-agent-sdk - The pattern exists in the Anthropic codebase
One-line fix - Adding windowsHide option to hook spawn calls
Affects professional users - Makes Claude Code unsuitable for enterprise Windows environments
Workaround Attempts:
I've investigated all possible workarounds (PowerShell -WindowStyle Hidden, VBScript wrappers, batch files, PATH shims) - none work because:
The initial cmd.exe window always appears before any wrapper
Hooks need stdin for JSON input, eliminating most wrapper approaches
The spawn happens in Claude Code before hooks.json is processed
Request:
Could this be included in the same fix as issue #14828? It's the exact same root cause (missing windowsHide in spawn options), just in the hooks execution path instead of tool execution path.
I'm a professional Windows user willing to test beta builds and provide detailed feedback.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
EngDawood commentedon Jan 11, 2026
yes , it's very annoying
thinkhalo commentedon Jan 11, 2026
Supporting this request - critical for plugin ecosystem
+1 for this feature request.
Use Case:
The claude-mem plugin executes hooks on every user interaction:
SessionStart→ Context injection (runs once per session startup)UserPromptSubmit→ Session initialization (every user message)PostToolUse→ Observation capture (every tool result)Stop→ Summary generation (every stop event)On Windows, each hook execution creates a visible console window popup, resulting in dozens of flashing windows per session. This makes the plugin (and Claude Code itself) nearly unusable on Windows.
Technical Details:
The issue is that hook spawn calls don't include
windowsHide: true. This is standard Node.js practice for Windows:Why This Matters:
windowsHideoption to hook spawn callsWorkaround Attempts:
I've investigated all possible workarounds (PowerShell
-WindowStyle Hidden, VBScript wrappers, batch files, PATH shims) - none work because:cmd.exewindow always appears before any wrapperRequest:
Could this be included in the same fix as issue #14828? It's the exact same root cause (missing
windowsHidein spawn options), just in the hooks execution path instead of tool execution path.I'm a professional Windows user willing to test beta builds and provide detailed feedback.
References:
Thank you!
topemalheiro commentedon Jan 19, 2026
Anthropic please fix this, it's really annoying and we want to use claude-mem.
github-actions commentedon Feb 27, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Mar 7, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.