Hooks not executing despite following documentation
Resolved 💬 11 comments Opened Jul 2, 2025 by grahama1970 Closed Jan 15, 2026
Hook Functionality Verification Report
Environment
- Claude Code Version: 0.10.14 (from ps output)
- OS: Ubuntu 24.04.2 LTS
- Date: 2025-07-02
Test Methodology
1. Hook Setup
Created executable hook scripts in ~/.claude/hooks/:
pre-tool(chmod +x)post-tool(chmod +x)pre-edit(chmod +x)
Each hook logs to /tmp/claude_hooks_*.log when executed.
2. Configuration
Added hook configuration to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/pre-tool"
}
]
}
],
"PostToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/post-tool"
}
]
}
]
}
}
3. Tests Performed
- Multiple Bash commands executed
- File creation using Write tool
- File editing using Edit tool
- Checked for log files after each operation
4. Results
- No log files created in
/tmp/claude_hooks_*.log - Manual execution of hooks works correctly
- Hooks do not appear to execute automatically during tool use
Observations
- Claude Code process running with flags:
--dangerously-skip-permissions --mcp-config "/home/graham/.claude/claude_code/.mcp.json" --continue - No hook-related processes detected during tool execution
- Settings file is valid JSON and readable
Questions
- Are there additional configuration steps required to enable hooks?
- Is there a specific flag needed when launching Claude Code?
- Are hooks only available in certain versions or editions?
Reproduction Steps
- Create hook script:
echo '#!/bin/bash\necho "Hook executed" > /tmp/hook_test.log' > ~/.claude/hooks/pre-tool && chmod +x ~/.claude/hooks/pre-tool - Configure in
~/.claude/settings.jsonas shown above - Execute any Bash command through Claude Code
- Check for
/tmp/hook_test.log- file is not created
Would appreciate clarification on whether hooks are currently functional and if there are additional setup requirements.
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗