git commit bypasses commit-msg hook (likely --no-verify)
Resolved 💬 2 comments Opened Jun 7, 2026 by akuzminsky Closed Jul 14, 2026
Bug
Claude Code appears to bypass the commit-msg git hook when running git commit. The pre-commit hook runs (its output is visible), but the commit-msg hook never fires — commits with invalid messages go through without rejection.
Evidence
commit-msghook is installed:.git/hooks/commit-msg -> ../../hooks/commit-msg- Hook is executable and works when called directly
- Hook validates conventional commit format and rejects non-conforming messages with exit 1
pre-commithook output IS visible during commit (formatting checks, terraform-docs)commit-msghook output is NOT visible, and non-conforming commits succeed
Expected behavior
git commit should respect the commit-msg hook. If the hook exits non-zero, the commit should fail.
Likely cause
The harness runs the pre-commit hook separately, then calls git commit --no-verify (or equivalent), which skips all git-native hooks including commit-msg.
Impact
Projects relying on commit-msg hooks for conventional commit enforcement get silently bypassed. This breaks changelog generation (git-cliff) and CI workflows that depend on commit message format.
Environment
- Claude Code CLI
- macOS (Darwin 25.5.0)
- Model: claude-opus-4-6
- Hook: symlink to bash script in
hooks/commit-msg
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗