Fixed
- Prompt-cache invalidation via
additionalContextinjection (GH #778).
PostToolUse[CODE HEALTH]notices and PreToolUse shadow-mode nudges injected
text intoadditionalContexton every qualifying event. On Anthropic models
this retroactively mutates the cached prefix, causing 440–520k tokens of cache
re-bills per injection. Fix: defaultinject_context = falsein[code_health]
config — notices now route toctx_knowledgeand the ContextBus (dashboard).
Opt-in via[code_health] inject_context = trueorLEAN_CTX_INJECT_CONTEXT=1. - Marker contamination in source files — root-cause fix. The redirect-suffix
(--- lean-ctx: ctx_compose ...) was appended directly to.lctxtemp files.
When agents copied temp-file content back into source, the marker leaked into
.rs/.js/.shfiles, breaking builds. Fix: the suffix is never written to
file content; the nudge travels exclusively viaadditionalContext(gated by
inject_context) or is suppressed entirely. - Release pipeline: rmcp crates.io compile bug.
rmcp 2.2.0on crates.io
callsSseStream::from_bytes_streambutsse-stream 0.2.xonly provides
from_byte_stream. Restored[patch.crates-io]to upstream git rev67a3085
which has the fix;cargo publish --no-verifybypasses broken verification. - Release pipeline: Homebrew SHA256 grep collision. The grep pattern
x86_64-unknown-linux-gnualso matched the-cudavariant, producing
multiple SHA256 values and breaking the GitHub Actions output format. Fixed
with.tar.gzsuffix anchoring.
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.9.5...v3.9.5