Skip to content

Project-scoped installs (--config-root/CLAUDE_CONFIG_DIR) silently fall back to ~/.claude in ~60 files #1665

Description

@rogdex24

The install Tools accept --config-root/--config-dir (or CLAUDE_CONFIG_DIR/LIFEOS_DIR env vars) to install LifeOS somewhere other than the global ~/.claude — useful if you want it scoped to one project instead of leaking into every Claude Code session.

But past the install step, ~60 files across install/LIFEOS, install/hooks, and install/skills hardcode homedir() + '.claude' (or $HOME/.claude in shell) directly, bypassing those flags entirely. In practice:

  • Hooks fire with commands pointing at files that were never placed there (No such file or directory) — hooks.json ships commands hardcoded to $HOME/.claude/..., and InstallHooks.ts merges them verbatim into settings.json without rewriting the prefix to the actual --config-root.
  • install/hooks/lib/paths.ts's getClaudeDir() — the central resolver several core hooks depend on (PromptProcessing, EventLogger, LoadContext, AgentInvocation) — only honors CLAUDE_PLUGIN_ROOT, not CLAUDE_CONFIG_DIR, so it silently falls back to the real home dir.
  • Dozens of memory/knowledge/Pulse tools construct their working paths as pathResolve(homedir(), ".claude/...") with no env-var check at all.

Net effect: a project-scoped install (--config-root <project>/.claude) works during setup, then silently reads/writes the real global ~/.claude once you actually use it.

Found and fixed while doing a real project-scoped install. PR incoming with the fix (60 files, all additive — env var checked first, falls through to the exact original default, zero behavior change for a normal global install).

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