Skip to content

Hardcoded /workspaces/ruvector paths in .claude/settings.json break hooks outside devcontainer #359

@shaal

Description

@shaal

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

  1. 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.
  2. 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.
  3. 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.
  4. 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

  1. Clone ruvnet/ruvector to any path other than /workspaces/ruvector.
  2. Run claude in the repo.
  3. Observe MODULE_NOT_FOUND errors on every hook event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions