Repository navigation
v3.12.5
Added
- Configurable multi-repo root limit (#2237).
ctx_multi_repostill admits 16 roots by
default;max_rootsinmulti-repo.tomlorLEAN_CTX_MAX_ROOTS(which wins) raises it,
up to a hard ceiling of 256. An invalid value is ignored. Roots a savedmulti-repo.toml
or--rootlists always load (up to the ceiling), so a process without the env cannot
drop them and then overwrite the file. Theadd_rooterror names both
settings,list_rootsshows the limit, andsave_configkeepsmax_rootsandrrf_k
that are already in the file.
Fixed
-
A knowledge category can be listed whole through
recall(#2248).ctx_knowledge action=recall category=<c>showed at mostrecall_facts_limitfacts (showing 10/41) with
no way to reach the rest, and only listed facts are refreshed against decay. The call now
takeslimit(up to a hard ceiling of 200) andoffset; the header names the window
(showing 11-20/41) and, while facts remain, the next offset.lean-ctx knowledge recall --category <c>takes--limitand--offset. Every fact a window returns counts as
recalled, as before.memory.knowledge.recall_facts_limitin a project's.lean-ctx.toml
sets that project's default window; a regression test now covers it. Query and bare recall
are unchanged. Reported by @antojk. -
ctx_multi_repo searchacross several roots (#2244). With two or more roots every
search failed with "search source authority changed or is unavailable": one source view
was held for the whole search while each root's index re-bound the request to its own
project. Each root is now searched under its own project's view and content policy; a root
withheld by its policy, or whose authority cannot be resolved, is named in a warning and
the others still answer. A requesting project under an active policy still refuses the
whole search, checked before and again after the roots are read.list_rootssays "index loads on first search" instead of
"pending". -
Cockpit starts on Windows with a shared
%TEMP%(#2203). The Cockpit's private copy
was staged under%TEMP%\leanctx-runtime-private; when%TEMP%or a folder above it grants
other users write access (C:\Temp, managed profiles) the private-directory check refused
it ("DACL grants an untrusted principal write or ownership access") andlean-ctx cockpit
answered 503. The copy is now staged beside the installed runtime, whose private ACL the
install already established;%TEMP%is no longer used. -
Shell gate reads
config.tomlfor directory-service accounts on musl (#2236). The
staticx86_64-unknown-linux-muslbuild has no NSS, so an account served by SSSD, LDAP,
NIS or winbind had no home in the account database: the release gate never read the
user'sconfig.tomland ran on the built-in defaults. Whengetpwuid_rfinds nothing,
Linux builds now askgetent passwd <uid>(only/usr/bin/getentor/bin/getent,
root-owned and not group/world-writable, empty environment, 3 s timeout) and accept the
home only when the line names this uid and an absolute directory.$HOMEis still never
consulted. The lookup is resolved once per process, a failed or timed-out one included: a
restart retries it. When no home can be found, the block
message says that no config location exists instead of naming~/.lean-ctx/config.toml,
andlean-ctx doctorreports the shell allowlist as running on defaults. -
ctx_globwalks only as far as the pattern reaches (#2250, thanks @dkiaulakis). A
pattern with a/and no**(src/*.rs,.tmp/prefix*) now descends only through its
literal leading directories and no deeper than its own component count; a leading./
anchors a name to the directory's own entries (./prefix*). Recursive walks (**, or a
slash-free name, which still matches at any depth) stop after 200,000 visited entries and
saycomplete=false (walk budget 200000 entries reached); a walk cut short by
max_resultssayscomplete=false (result cap N reached). Ignore rules, confinement and
secret-path redaction are unchanged.
Security
-
Rule-file backups and the
replace_symboltemp file no longer follow a planted symlink
(GHSA-x992-2945-crwx).lean-ctx init --agentanddoctor --fixwrote the backups
AGENTS.md.bak,.cursorrules.bakand.claude/rules/lean-ctx.bakwith a plain copy, so a
cloned repository that shipped such a name as a symlink had the repository's own rule file
written outside the project (for example to~/.bash_aliases). The backups now go through
the confined write, which refuses a symlinked component, and keep the source's permission
bits.lean-ctx uninstallnow writes its<file>.lean-ctx.bakbackups of the project's
AGENTS.mdand.hermes.mdthe same way. The headlessctx_patch replace_symbolpath
staged its edit in a fixed-name temp file and now uses the shared atomic writer with a
fresh, unpredictable temp file. Reported and fixed by @kasparovabi. -
quinn-udp 0.5.16 (RUSTSEC-2026-0538). The indirect dependency
quinn-udpmoves from
0.5.15 to the patched 0.5.16; its receive loop could spin after a truncated datagram. -
hono 4.13.18 and @hono/node-server 2.1.8 in the
pi-lean-ctxpackage lockfile
(from 4.13.13 and 2.1.5; Dependabot #2246, #2243).
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.12.4...v3.12.5