Fixed
claude_config_json_path()simplified: Removed over-complexparent()fallback logic that guessed at.claude.jsonlocations. Now directly uses$CLAUDE_CONFIG_DIR/.claude.jsonas documented by Claude Code.lean-ctx init --agent claudenow prints config path: Previously gave zero feedback about where MCP config was written. Now shows✓ Claude Code: MCP config created at /path/to/.claude.json— immediately reveals path mismatches (e.g. Docker USER mismatch writing to/root/.claude.jsoninstead of/home/node/.claude.json).refresh_installed_hooks()hardcoded~/.claude/: Hook detection inhooks.rsignored$CLAUDE_CONFIG_DIR, always checking~/.claude/hooks/and~/.claude/settings.json. Now usesclaude_config_dir().- Rules injection hardcoded
~/.claude/CLAUDE.md:rules_inject.rsalways wrote to~/.claude/CLAUDE.mdregardless of$CLAUDE_CONFIG_DIR. Now usesclaude_config_dir(). - Uninstall hardcoded
~/.claude/:remove_rules_files()andremove_hook_files()couldn't find Claude Code files when$CLAUDE_CONFIG_DIRwas set. Now usesclaude_config_dir(). - Doctor display hardcoded
~/.claude.json:lean-ctx doctoralways showed~/.claude.jsoneven when$CLAUDE_CONFIG_DIRpointed elsewhere. Now shows the actual resolved path.
Upgrade
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxFull Changelog: v3.1.5...v3.1.5