[BUG] Hooks don't always seem to fire

Resolved 💬 3 comments Opened Jan 23, 2026 by zeveck Closed Jan 26, 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 added a hook to require Claude Code to prompt before doing a git commit/push. Usually it triggers, but sometimes it does not. Here's CC's report on the latest instance.

GIT_HOOK_SKIPPED.md

What Should Happen?

All attempts to commit/push should prompt. If Claude can decide to skip the prompt based on prior context, then the hook isn't really reliable?

Error Messages/Logs

Steps to Reproduce

I don't know if this will reproduce generally. But

  1. Add a hook to restrict git commit (details in uploaded file).
  2. Use Claude Code to work on repo.

Observe that sometimes Claude will commit without prompting despite the hook.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.17 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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