[BUG] No hook is working on Windows
Status Closed — not planned
Maintainer reply None cached
Activity 6 comments · opened Oct 27, 2025 · closed Jan 17, 2026
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?
I've tested out several combinations of hooks, but None of them works.
Tested .claude/settings.json files:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "echo 'bla bla bla'"
}
]
}
]
}
}
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "isort 'tool_input.file_path'"
}
]
}
]
}
}
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/formatter.py"
}
]
}
]
}
}
Everytime I got error:[error] [Window] [Extension Host] [DEBUG] Hook output does not start with {, treating as plain text
I am using VS Code plugin. Could you explain me what I am doing wrong?
I've tried downgrade Claude extension as suggested in other issues, but it doesn't work either.
What Should Happen?
Hooks should trigger
Error Messages/Logs
[error] [Window] [Extension Host] [DEBUG] Hook output does not start with {, treating as plain text
Steps to Reproduce
Described above
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.27
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
### Additional Diagnostics: Windows Hooks - stdin Not Received
Environment:
Symptoms:
Testing Performed:
echo '{"session_id":"test","tool_name":"Bash","tool_input":"{}","tool_response":"ok"}' | bun save-hook.js
Output:
[INFO] → PostToolUse: Bash {workerPort=37778}✅{"continue":true,"suppressOutput":true}{"status":"ok"}--debug hooksflag - No improvementConclusion:
The hook script works perfectly when stdin data is manually piped. The worker receives and processes data correctly.
The issue is that Claude Code on Windows does not pass stdin data to hook commands.
This appears to be a Windows-specific subprocess communication issue.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.