You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interpreter probe fails on pipx installs: shebang with an argument is parsed as a file path #2629
Both the generated post-commit hook and the skill's own interpreter probes read the shebang of the graphify launcher and use it as a path. pipx writes #!/path/to/venv/bin/python -E — with an argument — so the string is not a path, and every probe falls through to a python3 that does not have graphify installed.
Result on my machine: every commit printed
[graphify hook] could not locate a Python with graphify installed.
for weeks, so the graph silently stopped updating. Since it is one line of noise after each commit, it went unnoticed for a long time.
Reproduce
$ which graphify
/Users/me/.local/bin/graphify
$ head -1 "$(which graphify)"| tr -d #!
/Users/me/.local/pipx/venvs/graphifyy/bin/python -E # <- note the argument
The character guard rejects the string because of the space, so the verification never runs and the probe never fires.
The ## Interpreter guard for subcommands block has the same parse without the import graphify verification, so it writes the unverified python3 fallback into graphify-out/.graphify_python. Every later step reads that pinned path and fails as if the install were broken.
Suggested fix
Strip the interpreter argument before using the shebang as a path, and verify the candidate before pinning it:
With cut -d" " -f1 the path resolves and the import check passes on a stock pipx install. The same two changes apply to the generated post-commit hook, which carries the identical probe.
I patched this locally in SKILL.md and confirmed the hook now reports launching background rebuild. Happy to open a PR if useful.
Environment: macOS 15 (Darwin 25.5.0), graphify 0.9.12, installed via pipx.
This pipx does not write #!/path/to/venv/bin/python -E. It writes a POSIX trampoline:
$ head -1 "$(which graphify)"
#!/bin/sh
$ sed -n 2p "$(which graphify)"
'''exec' "/Users/me/Library/Application Support/pipx/venvs/graphifyy/bin/python" "$0" "$@"
So the real interpreter is on line 2, and line 1 is /bin/sh — which passes the *[!a-zA-Z0-9/_.@-]* charset guard rather than being skipped by it. The probe then runs:
PYTHON stays empty, the probe falls through to python3, and that python3 has no graphify. Same end state as the -E variant, different cause — a fix that only strips shebang arguments will not catch this one.
Follow-on: the resolved path contains spaces
Once the correct interpreter is found, every subsequent skill code block does:
$(cat graphify-out/.graphify_python) -c "..."
unquoted. On macOS the pipx venv lives under ~/Library/Application Support/..., so this word-splits:
/Users/me/Library/Application: No such file or directory
I had to hand-quote "$(cat graphify-out/.graphify_python)" in every block for the whole run. The ## Interpreter guard for subcommands block has the same unquoted form.
Suggested fix that closes both variants and the quoting issue
A graphify --python-path (or graphify debug python) subcommand that just prints sys.executable from inside the installed package. That is authoritative regardless of shim format, and the skill's ~30-line detection block collapses to one line. Quoting still needs fixing in the snippets, since any path may contain a space.
Activity
cdtatarevich commentedon Aug 16, 2026
Second pipx shim format that defeats the same probe, plus a follow-on break after the probe succeeds.
Env: graphifyy 0.9.39, pipx 1.16.6, macOS 15 (Darwin 25.6.0), Claude Code host,
pipx install graphifyy.Variant 2: the
shtrampoline (no argument at all)This pipx does not write
#!/path/to/venv/bin/python -E. It writes a POSIX trampoline:So the real interpreter is on line 2, and line 1 is
/bin/sh— which passes the*[!a-zA-Z0-9/_.@-]*charset guard rather than being skipped by it. The probe then runs:PYTHONstays empty, the probe falls through topython3, and thatpython3has no graphify. Same end state as the-Evariant, different cause — a fix that only strips shebang arguments will not catch this one.Follow-on: the resolved path contains spaces
Once the correct interpreter is found, every subsequent skill code block does:
unquoted. On macOS the pipx venv lives under
~/Library/Application Support/..., so this word-splits:I had to hand-quote
"$(cat graphify-out/.graphify_python)"in every block for the whole run. The## Interpreter guard for subcommandsblock has the same unquoted form.Suggested fix that closes both variants and the quoting issue
A
graphify --python-path(orgraphify debug python) subcommand that just printssys.executablefrom inside the installed package. That is authoritative regardless of shim format, and the skill's ~30-line detection block collapses to one line. Quoting still needs fixing in the snippets, since any path may contain a space.fix(hooks): strip shebang argument so pipx launchers resolve (Graphif…
fix(hooks): cover skill shebang probes (Graphify-Labs#2629)
fix(hooks): qualify shebang paths by host
Merge branch 'v8' into fix/issue-2629
fix(skillgen): compact posix interpreter probe to keep lean core unde…
fix(hooks): strip shebang argument so pipx launchers resolve (Graphif…
fix(hooks): cover skill shebang probes (Graphify-Labs#2629)
fix(skillgen): compact posix interpreter probe to keep lean core unde…
fix(hooks): strip shebang argument so pipx launchers resolve (Graphif…
fix(hooks): cover skill shebang probes (Graphify-Labs#2629)
fix(skillgen): compact posix interpreter probe to keep lean core unde…