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
Stop/Session hooks fail on Windows when CWD is on a different drive than %USERPROFILE% #285
On Windows with Claude Code running in Git Bash / MSYS2, all three plugin hooks (SessionStart, SessionEnd, Stop) fail with MODULE_NOT_FOUND whenever the current working directory is on a different drive than %USERPROFILE%.
Observed error (project on D:\, plugin cache on C:\):
Stop hook error: Failed with non-blocking status code: node:internal/modules/cjs/loader:1386
Error: Cannot find module 'D:\c\Users\Gower\.claude\plugins\cache\openai-codex\codex\1.0.4\scripts\stop-review-gate-hook.mjs'
code: 'MODULE_NOT_FOUND'
Note the bogus D:\c\ prefix.
Root Cause
hooks/hooks.json passes ${CLAUDE_PLUGIN_ROOT} directly to node:
In Git Bash / MSYS2, Claude Code injects CLAUDE_PLUGIN_ROOT in POSIX form (e.g. /c/Users/Gower/.claude/plugins/...). Native node.exe does not understand /c/... — it interprets it as a drive-relative path under the current drive, prepending D: (the project drive) to produce D:\c\Users\..., which does not exist.
This affects all three hooks in 1.0.4/hooks/hooks.json: SessionStart, SessionEnd, Stop.
Repro
Windows 11 + Claude Code in Git Bash / MSYS2.
Install openai/codex-plugin-cc (cached under C:\Users\<user>\.claude\plugins\cache\...).
Open Claude Code in a project located on a different drive (e.g. D:\some\project).
Run anything that triggers the Stop hook (e.g. session ending).
Alternative: normalize CLAUDE_PLUGIN_ROOT inside the .mjs scripts via path.win32 / url.fileURLToPath so the JSON command stays simple.
Local Workaround
Patched hooks.json in the cache copy with the cygpath wrapper above. After the patch, sessions end cleanly with no MODULE_NOT_FOUND. (The patch is lost on plugin update, hence this report.)
Activity
fix(hooks): chdir into CLAUDE_PLUGIN_ROOT before node so cross-drive …
docs(v2.0.0): sync README + MIGRATION_v2.0.md + TROUBLESHOOTING.md wi…
fix(phase-b): Codex R1 review 3건 적용 — count 통일 + 분류 정리 + 경로 정확 표기
docs(exploration): Phase B — suminerProxy fork eval + upstream issue …
CBEPX commentedon Sep 29, 2026
I could not reproduce this cross-drive case. Could you retest on the fork v1.4.1 (https://github.com/CBEPX/codex-plugin-cc/releases/tag/v1.4.1) with a working directory on a different drive than
%USERPROFILE%? Install:/plugin marketplace add CBEPX/codex-plugin-cc, then/plugin install codex@cbepx. Please report your OS,codex --version, the/codex:status --jsonoutput, and the hook error text if it still fails.