AI products and toolsReviewed · yvgude

LeanCTX

LeanCTX is a tool that runs on your own computer for developers who use AI coding assistants such as Claude Code, Cursor or Codex; it shortens, filters and records the file contents and command output those assistants read. Its controls and any savings depend on which integration and configuration you use. It offers focused file views, shell-output compression, search, persistent task records and usage inspection. Effects on answer quality are unknown.

Researched 14 Nov 2026

In short.

LeanCTX is a tool that runs on your own computer for developers who use AI coding assistants such as Claude Code, Cursor or Codex; it shortens, filters and records the file contents and command output those assistants read. Its benefits depend on which tool calls and model requests actually pass through it. It documents structural file views, shell-output compression, configurable access controls, persistent context and local usage records. Historical compression figures have been withdrawn, simulated savings are estimates, and improved answer quality is unestablished. Installation reliability, enforcement and performance are not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to README.md at [https://github.com/yvgude/lean-ctx/blob/main/README.md], captured at revision b6de365bc94ebfe3187b42ed4627fcd30f4695a8, and the accompanying LICENSE, LICENSE.md, LICENSE_MATRIX.toml, NOTICE and THIRD_PARTY_NOTICES. Linked documentation, media, implementation code, installers, binaries, SDK/private components and live services are excluded. No commands, installations, integrations or benchmarks were executed. Runtime behavior, enforcement, performance and outcome quality remain untested.

The overview

What LeanCTX is

LeanCTX, distributed through the lean-ctx command, sits between AI tools and the files, repositories, command results and configured providers they read. The host application retains the task, agent loop and model choice. Its project overview is [https://github.com/yvgude/lean-ctx/blob/main/README.md].

The public tool runs locally through CLI, MCP, hooks and proxy integrations. The README separately directs application embedding to the LeanCTX SDK, with separate SDK/OEM terms.

Practical assessment

LeanCTX is worth considering when repeated file reads and long command output consume an AI assistant's context window. Its useful distinction is combining context selection with configured controls and inspectable records of supported operations.

The benefit depends on the assistant using the covered routes. An integration that only prepares context cannot prove what a later host-owned model request delivered. Lower token estimates alone establish neither lower invoices nor better answers.

Who it suits

The README targets developers who use AI coding tools daily, run many shell commands and work in medium or large repositories, including monorepos. It recommends starting with Claude Code, Cursor or Codex.

It is less compelling for tiny repositories, infrequent shell use or work that consistently requires complete raw logs. Developers seeking context continuity may also value its local task, fact and decision records; this persistence does not train the model.

Documented capabilities

Documented file views include full content, maps, signatures, diffs, line ranges and density-based selection. The README advertises 16 read modes, Tree-sitter structural support for 27 languages and more than 85 shell-output patterns. These coverage counts are project claims, not independently established results.

Search combines BM25 keyword retrieval, embeddings and graph proximity. Code graphs support impact analysis and related-file discovery; session memory and knowledge graphs retain context across sessions. Cockpit and CLI reports expose recorded activity, token estimates, calculated costs and available delivery evidence.

Configured path permissions, roles, content filters and budgets apply to supported calls. Filters can warn, redact or block, with coverage dependent on settings and integration.

Using it

Requirements and compatibility

A compatible AI client needs the required MCP transport, tool support and configuration. Hybrid integrations add shell hooks and require shell access. The README's broad compatibility table lists setup targets; it explicitly distinguishes those targets from verified integration support.

Installation routes include Homebrew, npm, Cargo and a downloadable installer. The npm route uses Node.js, while Cargo is the Rust installation route. Minimum client and toolchain versions, memory requirements, disk use and processing overhead are unknown.

For Claude Pro/Max, subscription OAuth cannot use the custom ANTHROPIC_BASE_URL route described in the README. Wrapping therefore enables tools and shell compression without adding that proxy redirect; Claude wire-level compression requires ANTHROPIC_API_KEY.

How it works

LeanCTX describes two paths. On the read path, MCP tools and shell hooks prepare file content and command output before the assistant sees them. On the optional wire path, a local proxy transforms eligible content in supported model-provider requests.

Structural views expose outlines before full bodies, while eligible cached reads can return compact references. Density-based compression selects lines toward a target token proportion. Supported compact results retain references for later expansion, but recovery requires permission, retention and an available source or archive.

The proxy documents provider-cache compatibility limits. Usage evidence depends on what each integration observes; context preparation records do not establish a subsequent model call outside that observed path.

Documented setup

One documented installation route is npm install -g lean-ctx-bin. Then use lean-ctx wrap cursor, lean-ctx wrap claude or lean-ctx wrap codex for the corresponding client. Wrapping registers the MCP server and configures the supported local transport.

The README recommends lean-ctx doctor to inspect the resulting setup. lean-ctx cockpit opens the local activity interface, and lean-ctx gain --terminal provides a terminal summary. lean-ctx unwrap cursor reverses wrapping for Cursor. These are documented instructions; successful installation and integration behavior are not assessed.

Example use

For a Rust repository containing src/server.rs, the README illustrates lean-ctx read src/server.rs -m map to request a structural view. It also illustrates lean-ctx -c "git status" to request compressed command output.

The intended workflow is to inspect structure or concise output first, then request detail as needed. Signature views provide line spans for targeted expansion. No output, token count or task result is established for these examples.

Assessment & evidence

Limits and cautions

Compressed views omit detail. The README describes source expansion and critical-fact preservation checks, but neither establishes preserved answer quality. Path permissions are not an operating-system sandbox, and content filtering does not cover every possible secret or integration.

Local context processing does not mean all activity stays offline. Configured providers, proxy/model requests, submitted feedback, updates and enabled telemetry have separate network paths. The README documents telemetry inspection and disabling commands, but effective defaults and payloads are not established here.

Agent handoffs, context packages, snapshots and addons are labelled experimental Research interfaces. A public addon marketplace, managed distribution, hosted context registry and generally available team service are not established.

What determines its value

The practical rationale is that task-specific views and reusable references may reduce repeated context while preserving routes back to detail. The tradeoff is the effort required to configure integrations and recover information omitted from compact views.

The README identifies integration reach, context lifetime and provider pricing as the main factors affecting payoff. This supports evaluating LeanCTX against a specific workflow: reducing emitted text may have little financial effect when provider caching already makes repeated input inexpensive.

Alternatives and baseline

A useful baseline is the same coding assistant using ordinary file reads and raw command output. The README provides a raw-output override and acknowledges lower value for small repositories and workflows requiring unfiltered logs.

The README names RTK, Context+ and MemGPT through its comparison link [https://leanctx.com/compare/]. It supplies no substantive side-by-side findings in this file, so their relative capabilities, prices and performance are not assessed.

Strength of the evidence

The functional evidence is the project's README, which documents intended behavior and important measurement limits. It does not independently establish installation success, compatibility, security enforcement, latency or reliability.

The README withdraws historical compression figures. Its dual-arm replay is described as a synthetic upper bound whose baseline excludes provider prompt caching. Proxy compression holdout measures prompt size on real traffic but reports answer quality as unknown; the README says a powered with/without quality study has not been run.

Linked security documentation, benchmark reports, client-constraint matrices and implementation files are outside the available functional evidence. The licence files and notices support reuse terms, not operational claims.

Access & freshness

Costs and savings

The Apache-2.0 public host carries no licence royalty, and the README says local functionality works without an account. Model-provider charges remain separate. Enterprise and SDK/OEM prices, local operating costs and support charges are not supplied.

Shadow Mode estimates a baseline from uncompressed token counts; it does not perform a second measured run. Actual savings depend on integration reach, session lifetime and provider pricing, including prompt-cache discounts. No monetary saving or break-even point is established for a particular workload.

Licence and reuse

LICENSE.md and LICENSE_MATRIX.toml identify the captured public distribution as apache-host. README.md is covered by the matrix's Apache-2.0 root-files rule, despite the README's Mixed licence badge. Apache-2.0 permits copying, modification and redistribution subject to its conditions, including supplying the licence, marking modified files and retaining required attribution and NOTICE content.

Third-party components retain their upstream terms, documented in THIRD_PARTY_NOTICES. Public-host licensing does not extend to separately delivered private or commercial implementations or establish the terms of separate SDK/OEM offerings. Apache-2.0 also limits trademark permissions.

Version and freshness

This description concerns revision b6de365bc94ebfe3187b42ed4627fcd30f4695a8, captured on 14 November 2026 at 02:34:50 UTC. The fixed README is [https://raw.githubusercontent.com/yvgude/lean-ctx/b6de365bc94ebfe3187b42ed4627fcd30f4695a8/README.md].

The latest released version and changes after this revision are unknown. Historical security-version references and future release statements in the README do not establish which features are available in a current package.

How to evaluate fit

Confirm your client's transport and proxy constraints before configuring it. Use the documented doctor command to inspect setup, then inspect effective telemetry with lean-ctx telemetry status and lean-ctx telemetry show.

Compare representative tasks using raw and compressed context. Examine correctness, missing-detail recovery and latency alongside provider-observed usage and cost. The documented lean-ctx benchmark report . and lean-ctx doctor overhead --gate commands can help examine compression and context overhead, but neither establishes answer quality.

Evidence for this report

LICENSEnotice · checked 2026-11-14
LICENSE.mdnotice · checked 2026-11-14
LICENSE_MATRIX.tomlnotice · checked 2026-11-14
NOTICEnotice · checked 2026-11-14
README.mdselected · checked 2026-11-14
THIRD_PARTY_NOTICESnotice · checked 2026-11-14