Fixed
- Critical: eliminate "Cannot start a runtime from within a runtime" panic —
Root cause (repro: vena/ctx_read_repro):
the post-read autonomy prefetch re-enters the read dispatch from inside the async
tool pipeline; nested reads hittry_delivery_check_blocking/
try_cache_check_blockingwhich calledDELIVERY_RUNTIME.block_on()on a
tokio-rt-worker thread — panic. Fix:delivery_block_on()helper detects ambient
runtime viaHandle::try_current()and spawns a scoped thread for the block_on.
Affects all projects with cross-file imports where prefetch selects map/signatures mode. - Tool handler session locks — replaced
Handle::block_on()in spawn_blocking
contexts withbounded_lockspin-loops (ctx_read, ctx_delta, ctx_edit, ctx_fill,
ctx_knowledge, ctx_patch, ctx_smart_read) and isolated runtimes (ctx_tools gateway).
Changed
multi_path.rssession read: replacedblock_in_placewithtry_read_ownedspin-loop.
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.17...v3.9.17