Problem
.claude/settings.json hardcodes /workspaces/ruvector/ for all 9 hook commands and the statusline. That path only exists inside the project's Codespaces/devcontainer environment. Anyone cloning the repo to a normal local path (e.g. ~/code/ruvector) sees every hook fail on startup:
SessionEnd hook [node /workspaces/ruvector/.claude/helpers/hook-handler.cjs session-end] failed:
Error: Cannot find module '/workspaces/ruvector/.claude/helpers/hook-handler.cjs'
code: 'MODULE_NOT_FOUND'
Why this matters
- Every Claude Code session is broken for non-devcontainer contributors. Nine hooks fail on every prompt, session start, and session end —
PreToolUse, PostToolUse, UserPromptSubmit, SessionStart (×2), SessionEnd, Stop, SubagentStart, plus the statusLine command.
- The claude-flow V3 features advertised in
CLAUDE.md silently don't work. Auto-memory sync, session restore, prompt routing, post-edit learning, status tracking, and the statusline all depend on these hooks. New contributors get a broken experience and no signal that the project's coordination layer isn't actually running.
- It undermines the project's own value proposition. RuVector/claude-flow ships these hooks as a demo of its hooks-automation system. When the reference project itself has broken hooks on any non-Codespaces machine, it's a bad first impression.
- Noisy errors pollute every session. Users see
MODULE_NOT_FOUND stack traces on every turn, making real errors harder to spot.
Fix
Replace every occurrence of /workspaces/ruvector with $CLAUDE_PROJECT_DIR — an env var Claude Code sets automatically to the project root at hook-firing time. Works identically in Codespaces, devcontainers, and local clones.
PR incoming.
Reproduction
- Clone
ruvnet/ruvector to any path other than /workspaces/ruvector.
- Run
claude in the repo.
- Observe
MODULE_NOT_FOUND errors on every hook event.
Problem
.claude/settings.jsonhardcodes/workspaces/ruvector/for all 9 hook commands and the statusline. That path only exists inside the project's Codespaces/devcontainer environment. Anyone cloning the repo to a normal local path (e.g.~/code/ruvector) sees every hook fail on startup:Why this matters
PreToolUse,PostToolUse,UserPromptSubmit,SessionStart(×2),SessionEnd,Stop,SubagentStart, plus thestatusLinecommand.CLAUDE.mdsilently don't work. Auto-memory sync, session restore, prompt routing, post-edit learning, status tracking, and the statusline all depend on these hooks. New contributors get a broken experience and no signal that the project's coordination layer isn't actually running.MODULE_NOT_FOUNDstack traces on every turn, making real errors harder to spot.Fix
Replace every occurrence of
/workspaces/ruvectorwith$CLAUDE_PROJECT_DIR— an env var Claude Code sets automatically to the project root at hook-firing time. Works identically in Codespaces, devcontainers, and local clones.PR incoming.
Reproduction
ruvnet/ruvectorto any path other than/workspaces/ruvector.claudein the repo.MODULE_NOT_FOUNDerrors on every hook event.