LeanCTX Context Optimizer
Optimizes AI agent context by compressing shell outputs, file contents, and logs by up to 99% to save tokens and improve reasoning efficiency.
LeanCTX (Lean Cortex) is a sophisticated cognitive context layer designed to maximize the efficiency of agentic systems like Claude Code and Cursor. By utilizing 62 MCP tools and tree-sitter AST parsing for 18 languages, it intelligently strips noise from verbose command outputs—such as build logs, git diffs, and dependency trees—while preserving essential semantic meaning. It features adaptive file reading modes, cross-session memory for persistent state, and a feedback loop that learns optimal compression patterns. This allows developers to work with massive codebases and long-running tasks without hitting context window limits or wasting tokens on non-essential data.