[FEATURE] Add windowsHide option for hooks on Windows
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] 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:
```json
{
"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_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗