github yvgude/lean-ctx v3.6.11

latest releases: v3.9.2, v3.9.1, v3.9.0...
one month ago

Fixed

  • Linux proxy restart loop (11258+ restarts) — When the lean-ctx binary is replaced during runtime (e.g. upgrade), Linux marks /proc/self/exe with (deleted) suffix. find_binary() in the systemd unit generator would write this corrupted path into ExecStart, causing systemd to pass (deleted) as a CLI argument on every restart. Now uses resolve_portable_binary() which strips the suffix. Additionally, the CLI dispatch defensively removes (deleted) from args if already present in existing units (webut report)
  • Windows ctx_read hangs — Session lock acquire and path canonicalization now have bounded timeouts (5s for RwLock, 2s for canonicalize()) preventing indefinite hangs on Windows reparse points and network paths (Butetengoy report)
  • Manifest generator uses stale tool_defsgen_mcp_manifest now reads from ToolRegistry (61 tools) instead of static granular_tool_defs() (56 tools), ensuring the website manifest always reflects the actual registered tool count

Changed

  • Context budget auto-escalationpressure_downgrade() now applies more aggressive mode downgrades based on ContextPressure: SuggestCompression downgrades automap, ForceCompression downgrades fullmap and auto|mapsignatures
  • Cache-stable LITM output — Dynamic session statistics (ACTIVE SESSION v…) moved from output prefix to suffix, preserving a stable prefix for LLM prefix-caching compatibility
  • ToolRegistry as SSOT for list_toolslist_tools handler now reads tool definitions from the registry instead of static tool_defs/, eliminating schema drift between exposed schemas and handler implementations
  • OnceLock for project rootfind_project_root() result cached via std::sync::OnceLock, eliminating repeated git rev-parse subprocess calls
  • Compaction sync tail-seekfind_latest_compaction() reads only the last 4KB of context_radar.jsonl instead of the entire file, bounding I/O for large radar logs

Removed

  • Dead code cleanup: removed unused functions, #[allow(dead_code)] attributes replaced with _ prefixes or deleted across 8 files

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-ctx

Note: After upgrading via cargo/npm/brew, run lean-ctx setup to refresh shell aliases. lean-ctx update does this automatically.

Full Changelog: v3.6.11...v3.6.11

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.