[Bug] User scope hooks not executing in new projects after v2.0.27 update

Status Fixed / completed
Maintainer reply None cached
Activity 6 comments · opened Oct 25, 2025 · closed Oct 31, 2025

Bug Description
After updating to version 2.0.27, all my 'user scope' hooks completely stopped working in new projects, as if they were disabled:

  • SessionStart
  • UserPromptSubmit
  • PreToolUse
  • PostToolUse
  • Notification
  • Stop

The hooks work normally when I:

  • Roll back to version 2.0.26
  • Run sessions in old projects that already have session history

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 2.0.27
  • Feedback ID: a8471069-6d13-40ee-83fa-4527f57b8b70

Errors

[]

View original on GitHub ↗

6 Comments

teren-papercutlabs · 10 months ago

My global hooks fired in some projects but not others. Reverting to 2.0.26 also solved this for me.

romeromarcelo · 10 months ago
My global hooks fired in some projects but not others. Reverting to 2.0.26 also solved this for me.

Exactly.

In existing projects, I still haven't figured out what makes some work and others not. But in new projects, none of them work.

anthonyjj89 · 10 months ago

I experienced the same issue with hooks not firing in v2.0.27. I found that hooks only work when Claude Code is run with the --debug or --debug hooks flag.

Working Workaround:

Create a wrapper script at /usr/local/bin/claude:

#!/bin/bash
# WORKAROUND: Claude Code 2.0.27 bug - hooks only work with --debug flag
if [[ ! "$*" =~ --debug ]]; then
    exec "/Users/ant/.claude/local/node_modules/.bin/claude" --debug hooks "$@"
else
    exec "/Users/ant/.claude/local/node_modules/.bin/claude" "$@"
fi

Make it executable: chmod +x /usr/local/bin/claude

This automatically forces debug mode for all Claude Code invocations, which makes hooks work again.

See #10401 for full details and investigation.

romeromarcelo · 10 months ago
I experienced the same issue with hooks not firing in v2.0.27. I found that hooks only work when Claude Code is run with the --debug or --debug hooks flag. Working Workaround: Create a wrapper script at /usr/local/bin/claude: #!/bin/bash # WORKAROUND: Claude Code 2.0.27 bug - hooks only work with --debug flag if [[ ! "$*" =~ --debug ]]; then exec "/Users/ant/.claude/local/node_modules/.bin/claude" --debug hooks "$@" else exec "/Users/ant/.claude/local/node_modules/.bin/claude" "$@" fi Make it executable: chmod +x /usr/local/bin/claude This automatically forces debug mode for all Claude Code invocations, which makes hooks work again. See #10401 for full details and investigation.

The workarounds outlined in #10385 by @yxcl6666 precisely resolve my problem.

I usually set "defaultMode": "bypassPermissions" directly in my ~/.claude/settings.json. To make the hooks work in Claude Code versions ≥2.0.27 with 'bypassPermissions', I need to:

  • Start the session on a project with standard mode first
  • Exit the session
  • Switch the setting back to "bypassPermissions"

This bug appears to have been introduced with the fix mentioned in the 2.0.27 CHANGELOG:

VSCode Extension: Bug fixes for unrelated 'Warmup' conversations, and configuration/settings occasionally being reset to defaults
romeromarcelo · 10 months ago

Today's update of Claude Code to version 2.0.30 fixed the issue where hooks and plugins weren't executing when using the --dangerously-skip-permissions flag. All my hooks now work as expected in both existing and new projects. 🙏 @bcherny

github-actions[bot] · 9 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.