Fixed
- Project root stuck at agent sandbox path (#124): The MCP session could retain a stale project root from a temporary directory (e.g.
~/.claude,/tmp/). Fixed with multi-layer healing:initializenow validates roots against project markers,session::load_by_iddetects and corrects agent/temp roots, andresolve_pathcan auto-update a suspicious root when given an absolute project path. Agents like Codex that start in sandbox directories now correctly resolve the actual project. lean-ctx gainshowing 0% for Shell Hooks (#126): Small savings percentages were rounded to 0% in the "Savings by Source" and "Live Observatory" sections. Introducedformat_pct_1dpfor one-decimal-place display,<0.1%for very small values, andn/awhen no input data exists.install.shfails on WSL2/Ubuntu (set: Illegal option -o pipefail):curl -fsSL leanctx.com/install.sh | shfailed becauseinstall.shused Bashisms but was executed by POSIXsh(dash). Added a POSIX-compliant preamble that auto-detects and re-executes underbash, with a clear error message ifbashis unavailable. Both| shand| bashnow work.- Dashboard "Live Observatory" showing 0 tokens saved: The Live Observatory pulled data exclusively from the active MCP session, ignoring shell hook savings. Now falls back to today's aggregate daily stats when no MCP session is active.
Added
rules_scopeconfiguration: Control where agent rule files are installed —"global"(home directory only),"project"(repo-local only), or"both"(default). Avoids duplicate rule files that waste context tokens. Configurable viaconfig.toml,LEAN_CTX_RULES_SCOPEenv var,lean-ctx config set rules_scope, or per-project.lean-ctx.tomloverride.- Codex/Claude path jail auto-allowlist: When running inside Codex CLI (
CODEX_CLI_SESSIONset),~/.codexis automatically added to allowed paths. Similarly,~/.claudeis auto-allowed for Claude Code sessions. No manualLCTX_ALLOW_PATHneeded. bunxandvp/vite-plusCLI compression (#125): Shell hook now routesbunxcommands through the bun compressor andvp/vite-plusthrough the Next.js build compressor.lean-ctx updateauto-refreshes setup: Runninglean-ctx updatenow automatically re-runs the full setup (shell hooks, MCP configs, rules) after updating, even when already on the latest version. Ensures all wiring stays current.- Website docs:
rules_scopedocumented on configuration page in all 11 languages.
Upgrade
lean-ctx update # recommended (auto-downloads + refreshes shell hooks)
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxNote: After upgrading via cargo/npm/brew, run
lean-ctx setupto refresh shell aliases.lean-ctx updatedoes this automatically.
Full Changelog: v3.2.6...v3.2.6