Bug Fix
Fixes critical bug where lean-ctx init --global caused all git commands to hang and crash with SIGABRT (#1).
Root Cause
Shell aliases created by init --global caused infinite recursion, especially on fish shell (which always loads config.fish, even for non-interactive shells).
Changes
- Recursion guard: Set
LEAN_CTX_ACTIVEenv var in subprocesses; passthrough mode when detected - No unnecessary tokio: CLI commands no longer spin up a tokio multi-threaded runtime (only MCP server and dashboard need async)
- Guarded aliases:
init --globalnow wraps aliases inLEAN_CTX_ACTIVEcheck for both fish (if not set -q) and bash/zsh (if [ -z ... ])
Upgrade
cargo install lean-ctx # via cargo
brew upgrade lean-ctx # via Homebrew (update coming shortly)Workaround for existing installations
If you already ran init --global with v1.5.0, the binary-level fix handles recursion automatically. For optimal performance, re-run init --global after removing the old aliases from your shell config.
Closes #1