hookify hooks use python3, fail on windows when only py works
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, typescript
- Domain
- tooling
Research direction
Start with plugins/hookify/hooks/hooks.json and compare its Python invocation with the security-guidance plugin's sg-python.sh, which the issue says tries python3, python, then py -3 while skipping the Microsoft Store shortcut. Update hookify so its hooks find a working Python on Windows and continue to work on macOS and Linux; verify the hook commands cover the reported events.
Written by the indexing model from the issue text.
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
all the hookify hooks run with a hardcoded python3 (plugins/hookify/hooks/hooks.json). on my pc python3 and python are both the microsoft store shortcut, not real python, so every hook fails and none of my hookify rules run. only py -3 works.
What Should Happen?
hookify should find a working python like the security-guidance plugin already does with its sg-python.sh (tries python3, python, then py -3 and skips the store shortcut). using that for hookify too would fix it.
Error Messages/Logs
PreToolUse:Read hook error
Failed with non-blocking status code: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
same thing on PreToolUse:Bash, PostToolUse:Bash and Stop.
Steps to Reproduce
- windows, python installed so only
pyworks (python/python3 are the store shortcuts) - install hookify and add any rule
- use any tool
- every hookify hook fails with "Python was not found"
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.335 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
workaround: changed python3 to py -3 in the cached hooks.json, but it gets overwritten on update and wouldnt work on mac/linux.
older issues about python3 got closed but hooks.json still uses it on main. switching to python like they suggested wouldnt help here since python is also the store shortcut.
- Dominant language
- TypeScript
- Stars
- 158k
- Forks
- 25.1k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anthropics/claude-code
-
area:tools bug has repro
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
anthropics/claude-code#113984 ·
-
area:docs bug documentation
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
anthropics/claude-code#113843 ·
-
area:tui bug has repro platform:linux
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anthropics/claude-code#113774 ·
-
[FEATURE] Windows Terminal: OSC 9;4 progress is turned off although Windows Terminal renders itOpenarea:tui enhancement platform:windows
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113765 ·
-
area:ide bug has repro platform:macos platform:vscode
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anthropics/claude-code#113738 ·
All issues in anthropics/claude-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tashfeenahmed/freellmapi#2305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
prime-radiant-inc/evener#8335 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel-labs/ui#1921 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
microsoft/monaco-editor#5626 ·
Maintainers usually reply within 1 day