[Bug] Hookify import error: No module named 'hookify'
Bug Description I still see errror "Hookify import error: No module named 'hookify'" Want me to check if hookify is available on PyPI, or just disable the plugin? ⎿ Stop says: Hookify import error: No module named 'hookify'
Environment Info
- Platform: darwin
- Terminal: phpstorm
- Version: 2.0.62
- Feedback ID: 82218bb0-6cf1-4e06-8b47-cc2764366206
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.61 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async TJA (/$bunfs/root/claude:2728:3431)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T04:47:45.795Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (/$bunfs/root/claude:2726:37692)\n at async Ag (/$bunfs/root/claude:2728:236)\n at async <anonymous> (/$bunfs/root/claude:2728:13013)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T04:47:54.975Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (/$bunfs/root/claude:2726:37692)\n at async Ag (/$bunfs/root/claude:2728:236)\n at async <anonymous> (/$bunfs/root/claude:2728:13013)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T04:48:01.894Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (/$bunfs/root/claude:2726:37692)\n at async Ag (/$bunfs/root/claude:2728:236)\n at async <anonymous> (/$bunfs/root/claude:2728:13013)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T05:09:08.711Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (unknown)\n at async Ag (unknown)\n at unknown\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T05:09:21.214Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (/$bunfs/root/claude:2726:37692)\n at async Ag (/$bunfs/root/claude:2728:236)\n at async <anonymous> (/$bunfs/root/claude:2728:13013)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T05:10:02.588Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (/$bunfs/root/claude:2726:37692)\n at async Ag (/$bunfs/root/claude:2728:236)\n at async <anonymous> (/$bunfs/root/claude:2728:13013)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T05:10:22.212Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/storm/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n at zh0 (/$bunfs/root/claude:2728:1620)\n at sCA (/$bunfs/root/claude:2726:35591)\n at async V$7 (/$bunfs/root/claude:2726:37692)\n at async Ag (/$bunfs/root/claude:2728:236)\n at async <anonymous> (/$bunfs/root/claude:2728:13013)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T05:11:06.361Z"}]
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/13426
- https://github.com/anthropics/claude-code/issues/13427
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Similar Issue on Windows + miniconda — Resolved
I had the same "No module named 'hookify'" error on Windows with miniconda. Here's what happened and how I fixed it:
My Experience
- Installed hookify plugin via
/plugin install hookify@claude-code-plugins - Started seeing this error after every Claude message:
Plugin hook error: Python was not found; run without arguments to install from the Microsoft Store... - Realized
python3command wasn't working — miniconda only providespython.exe, notpython3.exe, and Windows App Execution Alias was intercepting the command - Fixed
python3by creating a copy:cp /c/Users/$USER/miniconda3/python.exe /c/Users/$USER/miniconda3/python3.exe - After that fix, error changed to:
"Hookify import error: No module named 'hookify'" - Root cause: The original plugin installation had failed because
python3wasn't available at install time - Solution: Reinstalled the hookify plugin after fixing python3 — now it works perfectly
Steps to Resolve
1. Ensure python3 works first:
python3 --version
# If this fails or opens Microsoft Store, you need to fix it:
# For miniconda/Anaconda on Windows:
cp /c/Users/$USER/miniconda3/python.exe /c/Users/$USER/miniconda3/python3.exe
2. Then reinstall hookify plugin:
/plugin uninstall hookify@claude-code-plugins
/plugin install hookify@claude-code-plugins
⚠️ Important: Reinstalling alone won't help if python3 is still broken. You must fix python3 first, then reinstall.
Why This Works
When python3 is missing during initial installation, the plugin setup fails silently, resulting in an incomplete directory structure. Reinstalling after fixing python3 creates the correct structure with a hookify/ subdirectory that enables the Python imports to work.
I recommend trying this approach — it resolved the issue completely for me without modifying any plugin files.
I'm also getting this on every tool use after updating to the most recent claude.
⎿ PreToolUse:Task says: Hookify import error: No module named 'hookify'
⎿ PostToolUse:Task says: Hookify import error: No module named 'hookify'
⎿ PreToolUse:Task says: Hookify import error: No module named 'hookify'
⎿ PostToolUse:Task says: Hookify import error: No module named 'hookify'
⎿ PreToolUse:Task says: Hookify import error: No module named 'hookify'
⎿ PostToolUse:Task says: Hookify import error: No module named 'hookify'
@olafurns7 What platform are you on?
If you're on Windows with miniconda/Anaconda, check my comment above — fixing python3 and reinstalling the plugin resolved it for me.
If you're on macOS/Linux, first check if python3 --version works. If it does, try reinstalling the plugin:
/plugin uninstall hookify@claude-code-plugins
/plugin install hookify@claude-code-plugins
❯ python3 --version
Python 3.14.2
/plugin uninstall hookify@claude-code-plugins
/plugin install hookify@claude-code-plugins
and still
> /hookify:hookify is running…
⎿ Allowed 7 tools for this command
⎿ UserPromptSubmit says: Hookify import error: No module named 'hookify'
But found the error with Claude, and it's working ok now (a temporary workaround):
The plugin structure expects to import from hookify.core... but the plugin root is at .../hookify/0.1.0/ - so there's no hookify folder inside it. The import path is wrong.
The import from hookify.core.config_loader looks for:
- {sys.path}/hookify/core/config_loader.py
But the actual file is at:
- {CLAUDE_PLUGIN_ROOT}/core/config_loader.py
This is a bug in the hookify plugin itself. The imports should be:
from core.config_loader import load_rules # Not from hookify.core...
You can:
1. Report to plugin maintainer - this is their bug
2. Workaround - create a symlink so the import path works:
cd ~/.claude/plugins/cache/claude-code-plugins/hookify/0.1.0
ln -s . hookify
This creates a hookify symlink inside the directory pointing to itself, so from hookify.core... will work.
@olafurns7 What platform are you on?
If you're on Windows with miniconda/Anaconda, check my comment above — fixing
python3and reinstalling the plugin resolved it for me.If you're on macOS/Linux, first check if
python3 --versionworks. If it does, try reinstalling the plugin:/plugin uninstall hookify@claude-code-plugins /plugin install hookify@claude-code-plugins
I'm on macos, python version was fine, doing the uninstall/install didn't work.
This comment from a different duplicate thread of this problem, fixes it:
https://github.com/anthropics/claude-code/issues/13426#issuecomment-3632217611
Root Cause Analysis
This is a packaging bug, not a user environment issue. The plugin works with --plugin-dir but fails with marketplace installation.
Technical Cause
The hook scripts (e.g., hooks/stop.py) do:
PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT') # Set by Claude Code
parent_dir = os.path.dirname(PLUGIN_ROOT)
sys.path.insert(0, parent_dir)
from hookify.core.config_loader import load_rules # Expects hookify/ package
Problem: The import from hookify.core.* expects a directory named hookify/ in sys.path, but marketplace installation creates a hash-named subdirectory:
# Marketplace installation structure:
~/.claude/plugins/cache/claude-plugins-official/hookify/
└── ab2b6d0cad88/ ← PLUGIN_ROOT points here
└── core/
└── config_loader.py
# What the import expects:
~/.../hookify/
└── hookify/ ← This directory doesn't exist!
└── core/
When parent_dir (.../hookify/) is added to sys.path, Python looks for .../hookify/hookify/core/ which doesn't exist.
Why --plugin-dir Works
cc --plugin-dir /path/to/hookify
# PLUGIN_ROOT = /path/to/hookify
# parent_dir = /path/to
# Python finds: /path/to/hookify/core/ ✓
Reproduction (100% reliable)
# 1. Install hookify via marketplace (or /plugin install hookify@claude-plugins-official)
# 2. Verify broken state:
export CLAUDE_PLUGIN_ROOT="$HOME/.claude/plugins/cache/claude-plugins-official/hookify/ab2b6d0cad88"
python3 "$CLAUDE_PLUGIN_ROOT/hooks/stop.py" <<< '{}'
# Output: {"systemMessage": "Hookify import error: No module named 'hookify'"}
User Workaround
cd ~/.claude/plugins/cache/claude-plugins-official/hookify
ln -sf ab2b6d0cad88 hookify
This creates hookify/ → ab2b6d0cad88, so Python can find hookify/core/.
Suggested Fixes
Option A (plugin-side): Change imports to use PLUGIN_ROOT directly:
# Instead of: from hookify.core.config_loader import load_rules
# Use:
sys.path.insert(0, PLUGIN_ROOT)
from core.config_loader import load_rules
Option B (Claude Code-side): Create the package symlink during marketplace installation:
ln -sf $VERSION_HASH $PLUGIN_DIR/hookify
Confirmed on Linux (WSL2), and based on other reports also affects macOS and Windows. This affects all marketplace installations of hookify.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I had the exact same problem, however for me it said flat out "python was not found" for the userpromptsubmit script.. Issue for that is because these overpaid dipshits STILL CAN'T AFTER MONTHS, vibecode their hooks.json garbage to NOT pass python3... which literally doesn't god damn exist if you opted it like that, if you're on windows, and especially if you also have python just natively installed, and not as some trash sub-packaged within the sub-package within the sub-package within the sub-framework within the framework of some random garbage. And the issue to fix that is to.. simply remove the number 3, from python for every command in hooks.json (MAKE SURE YOU DO IT FOR ALL THE VERSIONS INSTALLED IN THE CACHE, because for some dumbass reason, there's always at least two of them, and you can't even tell which is actually newer / the one being used because BOTH are marked as the exact same date and time under "date modified"????????), and shocker shocker, suddenly hookify starts working again lol, and to figure it out which or what or if that is the cause, as the user ppf said above, literally just run python3 --version in your average terminal, if it reports some "not found" garbage exactly the same as you see if you attempt to run the hookify plugin with claude --verbose enabled, then there you go, run python --version, and if that almost certainly works, then issue confirmed lol. I wouldn't be shocked if this exact same cause is for all the other countless hookify errors that are still constantly reported after I repeat, months, or at the very least, have a single, line, of god damn, code, added, as a condition, for people, who didn't, install, and set their python, up, to use, the python3 argument.... GENUINELY incredible.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.