[MODEL] Claude Code does not acknowledge hooks configuration despite executing them
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude ignored my instructions or configuration
What You Asked Claude to Do
I asked: "Did you check the hooks? Did you not know they existed?"
(After noticing Claude executed hooks but claimed to be unaware of them)
What Claude Actually Did
- Claude executed hooks correctly (PostToolUse hooks showed "Running PostToolUse hooks…")
- When asked about hooks awareness, Claude responded:
> "I was aware of Claude Code's hooks feature, but I didn't check if hooks were configured in this project. I apologize."
- This contradicts the fact that hooks ARE configured in
~/.claude/settings.json(global settings) - Claude should have been aware of its own configuration at session start
Expected Behavior
Claude should have:
- Read
~/.claude/settings.jsonat session start - Been aware of which hooks are active
- Responded: "Yes, these hooks are configured: SessionStart, PreToolUse[Bash], PostToolUse[Bash], etc."
- Not claimed ignorance of configuration that is actively running
Files Affected
**Global settings:**
- `~/.claude/settings.json` (hooks and permissions)
**Hooks configured:**
- `SessionStart`: session-start-reminder.sh
- `PreToolUse[Bash]`: git-commit-push-block.sh
- `PreToolUse[Write|Edit]`: main-branch-code-warning.sh
- `PostToolUse[Bash]`: git-post-command-reminder.sh, branch-from-main-check.sh
- `PostToolUse[Write|Edit]`: doc-consistency-reminder.sh
- `PostToolUse[Bash|zsh]`: failure-check.sh
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
- Configure hooks in
~/.claude/settings.json:
{
"hooks": {
"SessionStart": [{"matcher": "", "hooks": [{"type": "command", "command": "~/.claude/hooks/session-start-reminder.sh"}]}],
"PreToolUse": [{"matcher": "Bash", "hooks": [{"type": "command", "command": "~/.claude/hooks/git-commit-push-block.sh"}]}],
"PostToolUse": [{"matcher": "Bash", "hooks": [{"type": "command", "command": "~/.claude/hooks/failure-check.sh"}]}]
}
}
- Start a new Claude Code session
- Observe hooks executing (log messages appear)
- Ask Claude: "What hooks are configured for this session?"
- Claude claims it hasn't checked or doesn't know, despite hooks actively running
Claude Model
Opus
Relevant Conversation
User: "Did you check the hooks? Did you not know they existed?"
Claude: "I was aware of Claude Code's hooks feature, but I didn't check if hooks were configured in this project. I apologize."
[Meanwhile, terminal shows: "Running PostToolUse hooks… (1/3 done)"]
Impact
Medium - Extra work to undo changes
Claude Code Version
2.0.76
Platform
Other
Additional Context
The core issue is that Claude Code mechanically executes hooks but does not internalize the configuration into its working context. This creates a disconnect where:
- Hooks work correctly at the system level
- But Claude's responses don't reflect awareness of them
- Users lose trust when Claude claims ignorance of active settings
Suggested improvement: At session initialization, Claude should parse and acknowledge settings from:
~/.claude/settings.json(global).claude/settings.json(project).claude/settings.local.json(project local)
This would make Claude's behavior consistent with its actual configuration.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗