Fixed
- Dashboard command counter — Shell commands in track-only mode (e.g.
git status,docker ps) that useexec_inheritare now counted viaexec_inherit_tracked(), andrecord_shell_commandno longer skips zero-token commands. Previously many commands went unrecorded in the dashboard. - SLO false positives —
CompressionRatioSLO now requires a minimum of 5,000 original tokens before evaluating, and the threshold was raised from 0.75 to 0.90. Eliminates constant "violated CompressionRatio" warnings caused byfullmode reads. - X11 clipboard in vim — Removed explicit stripping of
DISPLAY,XAUTHORITY, andWAYLAND_DISPLAYenvironment variables fromexec_buffered, restoring X11 clipboard sync after exiting vim/vi in Claude Code. - pack_cmd unwrap —
LocalRegistry::open()now returns a graceful error instead of panicking on IO failures. - cursor.rs JSON type safety —
merge_cursor_hooksnow validates JSON types before unwrapping, preventing panics whenhooks.jsoncontains unexpected structures.
Added
- Rules-staleness detection — On the first MCP tool call of a session, lean-ctx checks whether the agent's rules file contains the current version marker. If outdated, a
[RULES OUTDATED]warning is injected into the tool response, prompting the agent to re-read rules or runlean-ctx setup.
Changed
- Codebase maintainability — Split
doctor.rs(2,348 lines) intodoctor/{mod,integrations,fix}.rsanduninstall.rs(1,859 lines) intouninstall/{mod,agents,parsers}.rsfor better modularity. - Cloud-server cleanup — Removed unused
jwt_secretfield from cloud-server config and auth state.
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.5.3...v3.5.3