EPIC 6 — Perfect-First (Track A). A focused correctness + hygiene pass so the
session/knowledge layer behaves perfectly across projects, the disk footprint stays
bounded, and cold-start UX is useful immediately.
Fixed
- Project root never resolves to HOME /
// agent sandbox dirs (#2361):best_root_from_uris,root_from_env,resolve_roots_once, and theinitializehandler now reject broad/unsafe directories as a project root viapathutil::is_broad_or_unsafe_root, even when a client reports one. This was the root cause of cross-project context bleed (the "HOME mega-session"). - Cross-project session leakage (#2362):
SessionState::load_latest()no longer falls back to the globallatest.jsonpointer — it is strictly project-scoped and returnsNonefor an unsafe cwd. A newload_global_latest_pointer()covers the explicit "show my last session anywhere" UX, andconsolidate_latest()loads the session for its explicit project root instead of the process cwd. - Noise auto-findings suppressed (#2363): findings whose files live in VCS/dependency/build/cache dirs, virtualenvs, vendored code, home dotfiles (
~/.ssh/config…), or binary/log artifacts are dropped, andctx_searchno longer emitsFound?in N fileswhen no meaningful pattern could be identified. Knowledge recall now boosts exact key/category matches above incidental lexical hits. - Cold-start
ctx_overviewreturns a useful partial view (#2365): instead of only "INDEXING IN PROGRESS, try again", it returns detected project markers, a depth-2 gitignore-aware tree, and persistent knowledge while the graph builds in the background.
Added
lean-ctx sessions doctor [--apply](#2362): detects sessions rooted at a broad/unsafe path and non-destructively quarantines them tosessions/quarantine/.- Archive FTS disk cap enforcement (#2364): the archive index (
archives/index.db) now enforces an on-disk size cap (default 500 MB, override viaLEAN_CTX_ARCHIVE_DB_MAX_MB) by pruning the oldest entries + VACUUM. A new daemon-safestorage_maintenancepass also prunes accumulated quarantined BM25 indexes on startup, andlean-ctx doctorgains an Archive FTS footprint check.
Changed
- Self-healing rules refresh (#2365): when an outdated rules file is detected on the first tool call of a session, lean-ctx auto-refreshes the rules on disk (off the async runtime) instead of only nudging the user to run
lean-ctx setup.
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.6.26...v3.6.26