Use case · AI coding agents

Stop paying your coding agent
to reread your repo.

LeanCTX cuts AI coding-agent token usage by 60–90% by deciding what gets read: AST-aware read modes return signatures instead of full files, cached re-reads cost ~13 tokens, and 95+ shell patterns compress command output. Works with 30+ tools (Cursor, Claude Code, Codex, Copilot) via one lean-ctx setup.

The problem

What it costs you today.

01

Your agent rereads the same files all day

Every prompt re-feeds the same modules. Raw reads dump 4,200 tokens when ~920 carry the signal. Tomorrow it reads them again.

02

Shell output floods the window

One cargo build or npm install can burn thousands of tokens on progress bars and warnings your model never needed.

03

Context windows fill, accuracy falls

Context-rot research shows model accuracy dropping from 98% to 64% as windows fill with noise. More context is not better context.

Shipped today

The capabilities that do the work.

Everything below ships in the open-source binary today. No roadmap items, no waitlists.

Your tools LeanCTX Model
10 read modes map, signatures, diff, entropy and more. AST-aware via tree-sitter, 18 languages
Session cache cached re-reads cost ~13 tokens instead of the whole file
95+ shell patterns cargo, npm, docker, tsc, pytest… compressed to errors + results
30+ AI tools Cursor, Claude Code, Codex, Copilot, Windsurf, Cline. One setup command
lean-ctx gain shows exactly what you saved, from your signed local ledger
Quickstart

From zero to first gain.

# install
$ curl -fsSL https://leanctx.com/install.sh | sh
# auto-detect and configure every installed AI tool
$ lean-ctx setup
# verify the integration
$ lean-ctx doctor
# after a day of work: see what you saved
$ lean-ctx gain
FAQ

Questions teams ask before adopting.

How much does LeanCTX reduce Cursor or Claude Code token usage?

Measured on real repo operations: 60–90% fewer tokens per read, ~13 tokens for cached re-reads, and 88–99% on shell output. Run lean-ctx benchmark report . to reproduce the numbers on your own repository.

Does it change how I work in my editor?

No. After lean-ctx setup, your AI tool calls LeanCTX automatically via MCP or shell hooks. You keep your editor, your agent and your workflow. The context layer works underneath.

Does compression lose information my agent needs?

No, and nothing is ever lost. AST-aware modes keep signatures and structure, and every original stays locally retrievable via ctx_retrieve. Smaller context typically improves answers: context-rot research shows accuracy falling as windows fill with noise.

Take back control of your context.

Free for local use, forever. CI enforces it. One binary, ten minutes to the first measured gain.