[MODEL] Claude Code does not acknowledge hooks configuration despite executing them

Resolved 💬 3 comments Opened Jan 5, 2026 by TakumiOkayasu Closed Jan 6, 2026

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

  1. Claude executed hooks correctly (PostToolUse hooks showed "Running PostToolUse hooks…")
  2. 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."

  1. This contradicts the fact that hooks ARE configured in ~/.claude/settings.json (global settings)
  2. Claude should have been aware of its own configuration at session start

Expected Behavior

Claude should have:

  1. Read ~/.claude/settings.json at session start
  2. Been aware of which hooks are active
  3. Responded: "Yes, these hooks are configured: SessionStart, PreToolUse[Bash], PostToolUse[Bash], etc."
  4. 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

  1. 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"}]}]
  }
}
  1. Start a new Claude Code session
  2. Observe hooks executing (log messages appear)
  3. Ask Claude: "What hooks are configured for this session?"
  4. 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:

  1. Hooks work correctly at the system level
  2. But Claude's responses don't reflect awareness of them
  3. 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗