bug: `lean-ctx doctor` is unaware of the post-migration file locations
lean-ctx version: lean-ctx 3.8.7 (official, https://github.com/yvgude/lean-ctx)
OS: Linux
AI tool: Claude Code
What happened:
Migrated to XDG directory locations via lean-ctx doctor --fix after upgrading to 3.8.7. The report still references the old locations, e.g. /home/<username>/.lean-ctx/config.toml.
What you expected:
lean-ctx doctor to report the updated locations.
Steps to reproduce:
lean-ctx doctor --fixlean-ctx doctor
Relevant output:
The doctor report after running --fix (note: username is redacted):
✓ lean-ctx in PATH /home/<username>/.local/bin/lean-ctx
✓ lean-ctx version lean-ctx 3.8.7 (resolved: /home/<username>/.local/bin/lean-ctx)
✓ data dir exists /home/<username>/.lean-ctx
✓ stats.json not yet created (will appear after first use) /home/<username>/.lean-ctx/stats.json
✓ config.toml not found, using defaults (expected at /home/<username>/.lean-ctx/config.toml)
✓ Shell allowlist 102 command(s) enforced (add one: lean-ctx allow <cmd>)
✓ Path jail active (project root only; extend via allow_paths in ~/.lean-ctx/config.toml)
✓ Compact-format passthrough toon (preserved verbatim, not recompressed)
✓ Permission inheritance on (on, but no OpenCode permission rules found yet)
✓ Proxy upstream provider defaults
✓ Shell aliases lean-ctx referenced in ~/.bashrc
✓ MCP config lean-ctx found in: Claude Code (/home/<username>/.claude.json)
✓ SKILL.md installed for Claude Code
✓ Dashboard port 3333 available on 127.0.0.1
✓ Daemon running (PID 27300)
✓ Providers none configured (enable via [providers] in config.toml)
✓ Plan mode Claude Code permissions present
✓ Session state no active session (will be created on first tool call)
✓ Build origin official https://github.com/yvgude/lean-ctx
✓ Cache safety cache_alignment + provider_cache operational
✓ Claude Code instructions CLAUDE.md block + skill installed (MCP instructions capped at 2048 chars — full content via CLAUDE.md)
✓ BM25 cache no vector dirs
✓ Archive FTS 0.0 MB / 500 MB cap
✓ Memory profile balanced (config: default — single embedding engine, BM25 disk 512 MB)
✓ Memory cleanup aggressive (default: cache cleared after 5 min idle, single-IDE optimized)
✓ RAM Guardian 32 MB / 15.5 GB system (0.2%) limit: 795 MB (jemalloc, daemon)
✓ Capacity no memory stores
✓ Knowledge stores no orphaned stores
✓ Proxy disabled (optional feature) enable: lean-ctx proxy enable
✓ Deprecations none active (register: DEPRECATIONS.toml, policy: CONTRACTS.md)
The --fix command also deleted my existing config.toml file
config.toml.bak doesn't exists
The
--fixcommand also deleted my existingconfig.tomlfileconfig.toml.bak doesn't exists
Interesting. For me, config.toml was correctly moved to ~/.config/lean-ctx. Although it's all for nothing anyway because #439 :)
Fixed on main in 65a4ce080c.
The config.toml check and the path-jail hint were hardcoded to ~/.lean-ctx, so after the XDG split doctor pointed users at a stale path.
Both now resolve through Config::path() / config_dir() and report where the file actually lives post-migration.
Will be closed with the next release.
Fixed in v3.8.8. doctor now reports the real config.toml location after an XDG split and is aware of the post-migration file locations.
Release: https://github.com/yvgude/lean-ctx/releases/tag/v3.8.8