PostToolUse hooks show "hook error" despite successful execution (exit 0, valid JSON)
Resolved 💬 3 comments Opened Feb 11, 2026 by BlockBlox-MD Closed Feb 15, 2026
Environment
- Claude Code version: 2.1.39
- OS: Linux (WSL2) -
Linux 6.6.87.2-microsoft-standard-WSL2 - Project:
/mnt/c/Users/MarcoAniballi/Radicle/alpha-delta-context
Issue
PostToolUse:Bash hooks display "PostToolUse:Bash hook error" in the UI even though all hooks execute successfully.
Evidence of Success
- ✅ All hooks return valid JSON:
{"hookSpecificOutput": null, "decision": null} - ✅ Debug logging shows
SUCCESS!after each execution - ✅ Exit code: 0
- ✅ No stderr errors
- ✅ Hooks complete within timeout (3s/5s/10s)
- ✅ Functionality works correctly (compression, instinct extraction, audit logging all functional)
Hooks Configuration
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/posttool-output-compression.py\"",
"timeout": 10
},
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/posttool-instinct-extractor.py\"",
"timeout": 5
},
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/posttool-audit-logger.py\"",
"timeout": 3
}
]
}
Observed Behavior
Every Bash command shows 3x "PostToolUse:Bash hook error" messages despite hooks working correctly.
Example output:
● Bash(echo "test")
⎿ test
⎿ PostToolUse:Bash hook error
⎿ PostToolUse:Bash hook error
⎿ PostToolUse:Bash hook error
Expected Behavior
No error messages when hooks exit 0 with valid JSON.
Related Issues
Similar to #17088 (PreToolUse hooks showing false errors)
Contact
marco@novarra.vc
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗