Repository navigation
Description
Problem
The SessionStart dependency hooks of animation, explainer-video and speech hand a POSIX path to a
native Windows Python and rely on Git Bash to rewrite it. When the session's environment switches
that rewriting off, Python gets /c/Projects/..., resolves it against the current drive as
C:\c\Projects\...\scripts\pydeps.py, fails to open it, and the plugin's packages are never
installed.
On origin/main (animation 0.4.5, explainer-video 0.2.4, speech 0.2.3):
plugins/{animation,speech}/hooks/install-python-deps.sh:12-13and the same lines in
explainer-video:SCRIPT_DIR="$(cd "${BASH_SOURCE[0]%/*}" && pwd)",ROOT="${SCRIPT_DIR%/*}".
Under Git Bashpwdreturns/c/....animation/hooks/install-python-deps.sh:38,speech/hooks/install-python-deps.sh:38,
explainer-video/hooks/install-python-deps.sh:86:
"$py" "$ROOT/scripts/pydeps.py" install --data-dir "$data". The script path crosses into native
Python unconverted.- This breaks rules 2 and 3 of
docs/conventions/windows-path-emit/README.md(convert an absolute
path at the boundary, withcygpath, preferring mixed form-m). The hooks' own tests already
do it:plugins/speech/hooks/install-python-deps.test.sh:44wraps paths incygpath -m.
explainer-video's hook converts paths for its repair line (:72) but not for the call itself.
A repo-wide search of plugins/*/hooks/*.sh and lib/*.sh found only these three call sites
handing a pwd-derived POSIX path to a native interpreter.
Evidence
From a performance audit on one Windows 11 host (SETWORKS-KSDEV1, Claude Code 2.1.289, Git for
Windows 2.55) on 2026-10-04, re-checked this pass.
- Verified this pass: with conversion on,
python3 -c 'import sys; print(sys.argv[1:])' /c/Projects/melodic/x.py
prints['C:/Projects/melodic/x.py']. WithMSYS_NO_PATHCONV=1set for that command it prints
['/c/Projects/melodic/x.py'], whichos.path.abspathresolves toC:\c\Projects\melodic\x.py:
the exact form in the observed failure. - Verified this pass (transcript search, last 7 days): the
can't open file 'C:\c\Projects\melodic\claude-code-plugins\plugins\<plugin>\scripts\pydeps.py'
notice appears for all three plugins only in two headless sessions the audit itself launched as
MSYS_NO_PATHCONV=1 timeout 240 claude -p .... Every hook in those sessions inherited the
suppressor. Each such start injected about 1,050 characters (about 260 tokens) of failure notices
and paid about 15 process starts for nothing. - Did not reproduce: the item's "fails every session". In ordinary sessions animation and speech
did not fail; explainer-video failed in four home-directory sessions with a traceback naming
context_aware_warnings, the PYTHONHOME handover defect fixed by fix(explainer-video): scrub PYTHONHOME and PYTHONPATH from the pydeps interpreter handover #6166 (issue fix(explainer-video): scrub PYTHONHOME and PYTHONPATH from pydeps interpreter handover #6162). The related
py-launcher discovery gap was fixed by fix(explainer-video): find a py-launcher-registered Python on Windows #6189 (issue fix(explainer-video): Windows interpreter discovery misses the py launcher, so the suggested python.org install does not resolve #6186). - Inferred (E3): any session started with
MSYS_NO_PATHCONVorMSYS2_ARG_CONV_EXCLin its
environment breaks all three hooks the same way. The windows-path-emit convention itself
prescribes a one-command prefix,MSYS_NO_PATHCONV=1 <command>, and when that command is
claudethe prefix reaches every hook.
Proposed approach
- In each of the three hooks, convert the script path where it crosses into Python, not at its
source (convention rule 2): onmsys*orcygwin*OSTYPE, pass
"$(cygpath -m "$ROOT/scripts/pydeps.py")"; elsewhere pass it unchanged. Do the same for
--data-dirwhen$datais a POSIX path (it normally arrives from Claude Code in Windows form,
so this is a no-op then). - If
cygpathis missing or fails, report it in the notice rather than falling back to the
unconverted path (convention rule 4), or usescripts/emit-windows-path.sh's posture. - Extend each
hooks/install-python-deps.test.shwith a case that runs the hook with
MSYS_NO_PATHCONV=1exported and a stub Python that records its first argument; assert the
argument is a drive-letter path. - Version bump and CHANGELOG entry for each of the three plugins.
Considered, not part of this fix:
- A stamp-file fast path that skips the readiness check when the requirements hash is unchanged
(the item's second request). It conflicts with Rule P3 of
docs/conventions/on-demand-dependencies/README.md(:56,:142): readiness is a load probe,
not a version or stamp check, so a stamp would let a damaged install pass. It needs a convention
decision first, and it overlaps the SessionStart cost work in
perf(hooks): skip node-notice and probe SessionStart rows on compaction #6251. - Scoping these niche plugins per project instead of at user scope: a user configuration choice,
not a plugin change.
Acceptance criteria
- With
MSYS_NO_PATHCONV=1exported in the hook's environment on Windows Git Bash, each of the
three hooks passes Python a drive-letter path topydeps.pyand its install proceeds. - Without the suppressor, behavior is unchanged on Windows, Linux and macOS.
- Each hook's test covers the suppressed-environment case and fails before the fix.
- Both
msys*andcygwin*OSTYPEvalues take the conversion path (OSTYPE=cygwinwas
observed in Claude Code's Bash tool on this host). - Hooks still always exit 0 (
install-python-deps.sh:6). - Version bumped and CHANGELOG entries added for animation, explainer-video and speech.
Constraints and gotchas
- explainer-video resolves
pyto a POSIX path throughcygpath -u(:29); the interpreter path
itself is fine as POSIX because Git Bash resolves it, only the script argument needs converting. - The guardrails
block-exported-msys-pathconvguard blocksexportand a shell command word after
the prefix, but notMSYS_NO_PATHCONV=1 claude ..., which leaks the suppressor into every hook.
That guard is security class; whether to extend it is Kyle's call, and this issue does not change
it. - The three hooks are near-copies (speech and animation differ only in their notice text). Keep the
change identical across them.
Context
Source: local handoff item 20261004-150216-claude-perf-audit-plugin-fixes.md, fix 4 (retired into
this issue). Part of #6244.
Related: #6162 and #6166 (explainer-video PYTHONHOME handover), #6186 and #6189 (py launcher
discovery), #2870 (exported path-conversion suppressor), #6017 (bounded interpreter versions in
prerequisites).
Activity
github-actions commentedon Oct 4, 2026
Thanks for the detailed writeup. As I understand it: the SessionStart dependency hooks for animation, explainer-video and speech hand a POSIX path to native Windows Python when resolving
pydeps.py, and normally Git Bash's automatic path conversion fixes this up — but when a session's environment disables that conversion (e.g.MSYS_NO_PATHCONV=1), Python receives the raw POSIX path, resolves it against the wrong drive, and the install silently fails to find the script. The proposed fix converts the path explicitly at the Python boundary withcygpath -minstead of relying on Git Bash's implicit rewriting, plus adds a regression test per hook and the usual version/CHANGELOG bump.This looks well-scoped with clear acceptance criteria and reproduction evidence, so there's nothing missing from my read. I didn't find an existing open issue duplicating this one; #6244 is the related tracking issue already referenced in the body, and #6162/#6186 are the separate (closed) issues it distinguishes itself from.
Automated triage. A maintainer reviews it.