LifeOS supports installing outside the default ~/.claude location via the CLAUDE_CONFIG_DIR environment variable, and hooks/lib/paths.ts implements correct resolution for this (getClaudeDir() checks CLAUDE_CONFIG_DIR → CLAUDE_PLUGIN_ROOT → falls back to
~/.claude; getLifeosDir() similarly checks CLAUDE_PLUGIN_ROOT → LIFEOS_DIR → falls back to ~/.claude/LIFEOS).
However, the large majority of hooks and tool scripts don't use this helper. Instead they define their own local HOME/CLAUDE_DIR/LIFEOS_DIR constants that hardcode ~/.claude directly, e.g.:
const HOME = process.env.HOME || "";
const CLAUDE_DIR = join(HOME, '.claude');
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS");
const CLAUDE_ROOT = pathResolve(homedir(), ".claude");
These bypass CLAUDE_CONFIG_DIR entirely. On an install at a non-default path (e.g. ~/.claude-lifeos), these scripts silently resolve to the wrong, nonexistent ~/.claude directory instead of the actual install root — causing reads/writes to the wrong location or outright failures.
Scope
Roughly 116 files are affected, spanning:
- hooks/.hook.ts, hooks/lib/.ts, hooks/handlers/*.ts — including hooks that fire on every tool call (e.g. HookHealer.hook.ts, SystemFileGuard.hook.ts, CheckpointPerISC.hook.ts, MemoryHealthGate.hook.ts, WritingGate.hook.ts)
- LIFEOS/TOOLS/.ts and subdirectories (healthsync/, llcli/, TokenXray/) — including core tools like algorithm.ts, WorkSweep.ts, TelosFreshness.ts, ArchitectureSummaryGenerator.ts, and the InstallSweep.ts plist installers
Critically, the same hardcoded pattern also exists in the install/template sources that the /lifeos update workflow overlays into a live install (e.g. skills/LifeOS/install/hooks/.ts, skills/LifeOS/install/LIFEOS/TOOLS/.ts). Fixing only the live copies is
not durable — the next /lifeos update run re-copies from these templates and will reintroduce the bug.
Suggested fix
Refactor all affected files to import and use the existing helpers from hooks/lib/paths.ts (getClaudeDir(), getLifeosDir(), getEnvPath(), paiPath()) instead of locally reconstructing ~/.claude-based paths. This must be applied consistently to both the live
hooks//LIFEOS/TOOLS/ trees and their corresponding template sources under skills/LifeOS/install/, so the fix survives future update overlays.
To reproduce
- Install LifeOS with CLAUDE_CONFIG_DIR set to a non-default path (e.g. ~/.claude-lifeos).
- Run any affected tool/hook (e.g. bun LIFEOS/TOOLS/WorkSweep.ts) and observe it operating against ~/.claude/... instead of the configured install root.
LifeOS supports installing outside the default ~/.claude location via the CLAUDE_CONFIG_DIR environment variable, and hooks/lib/paths.ts implements correct resolution for this (getClaudeDir() checks CLAUDE_CONFIG_DIR → CLAUDE_PLUGIN_ROOT → falls back to
~/.claude; getLifeosDir() similarly checks CLAUDE_PLUGIN_ROOT → LIFEOS_DIR → falls back to ~/.claude/LIFEOS).
However, the large majority of hooks and tool scripts don't use this helper. Instead they define their own local HOME/CLAUDE_DIR/LIFEOS_DIR constants that hardcode ~/.claude directly, e.g.:
These bypass CLAUDE_CONFIG_DIR entirely. On an install at a non-default path (e.g. ~/.claude-lifeos), these scripts silently resolve to the wrong, nonexistent ~/.claude directory instead of the actual install root — causing reads/writes to the wrong location or outright failures.
Scope
Roughly 116 files are affected, spanning:
Critically, the same hardcoded pattern also exists in the install/template sources that the /lifeos update workflow overlays into a live install (e.g. skills/LifeOS/install/hooks/.ts, skills/LifeOS/install/LIFEOS/TOOLS/.ts). Fixing only the live copies is
not durable — the next /lifeos update run re-copies from these templates and will reintroduce the bug.
Suggested fix
Refactor all affected files to import and use the existing helpers from hooks/lib/paths.ts (getClaudeDir(), getLifeosDir(), getEnvPath(), paiPath()) instead of locally reconstructing ~/.claude-based paths. This must be applied consistently to both the live
hooks//LIFEOS/TOOLS/ trees and their corresponding template sources under skills/LifeOS/install/, so the fix survives future update overlays.
To reproduce