Noise goes. Failures stay.

Less for your agent to read, every turn.

Lean trims verbose shell output before your coding agent reads it while preserving every error line, intercepts bloated Antigravity file reads, enforces a shared hook + MCP turn budget and audits Turn-1 prefix bloat.

Claude Code · Codex · Antigravity CLI · runs on your machine

Five ways Lean shrinks every turn

T8 · 100 % markers kept

Shell compaction via footnote run

Hooks installed by footnote install --lean wrap builds, tests, linters, git and search commands in Claude Code, Codex and Antigravity CLI (agy / T3 Code). Passes through untouched whenever filtering wouldn't make output smaller; full logs stay local via footnote output <id> (secrets never cached).

Antigravity

Read & re-read guards

Intercepts oversized whole-file reads (≥ 500 lines) on indexed repos with Code Graph outlines, caps unindexed files, blocks unchanged repeat whole-file reads within 20 steps, and guides grep calls toward symbol search.

HOOK-BUDGET · −57.1 %

Unified hook + MCP turn budget

Hard per-event caps (3,400 B start, 1,200 B prompt/tool) plus an HMAC-verified shared shown-log eliminate 100 % of hook ↔ MCP duplicates.

MCP-61 · 3,979 B

Turn-1 prefix audit

footnote audit-prefix --probe-mcp measures what MCP schemas, instructions and skills send on every turn. Footnote's 8-tool MCP schema fits in 3,979 B (under the 5,000 B budget).

Usage & Lean B

Handoff, Lean B & offline pricing

Warns past 140,000 tokens (or 55 idle min above 60k) for a clean handoff, toggles memory.lean_rules via a 4-bar picto in Launcher Usage, and prices transcripts locally using a bundled LiteLLM snapshot (usage --sync-prices to refresh).

Shell filter measurements (T8)

13 cases across 6 command families (20 Nov 2026). Pre-registered gate: keep at least 99 % of failure markers, save at least 20 % of bytes, never bloat output. Every family kept 100 % of failure markers (99 of 99).

Command familyCasesBytes savedFailure lines kept
cargo test388.8 %9 of 9 100 %
cargo build180.6 %6 of 6 100 %
test runners269.4 %7 of 7 100 %
linters252.0 %10 of 10 100 %
git324.7 %27 of 27 100 %
search222.5 %40 of 40 100 %

Failure markers cover compiler error codes, failing assertions, panic locations, diff hunks, search line numbers and lint rule codes (5 recordings + 8 live commands on this repository; pre-registered gate, not a broad field study).

Against RTK 1.2.0: same live commands

RTK compresses aggressively on tests and diffs, at the cost of dropping actual failure lines. On rg search it saves nothing. Chart compares failure marker retention rate directly above the raw table.

CommandFootnote savedFootnote keptRTK savedRTK kept
cargo test88.0 %2 of 2 100 %96.9 %1 of 2 dropped
git diff (3 commits)10.2 %12 of 12 100 %16.2 %6 of 12 dropped
git log -2070.1 %10 of 10 100 %56.7 %10 of 10
rg (one pattern)20.9 %20 of 20 100 %0.0 %20 of 20

Opt-in Lean B & open measurements

In our 7-arm claude-haiku-5-5 single-turn evaluation (126 calls, 25 Nov 2026, LEAN-B), lean_b_lite delivered the lowest cost per accepted answer while keeping 6/6 durable-prose compliance. Paired 95% confidence intervals vs Control crossed zero, so concise output rules remain opt-in (memory.lean_rules = false by default).

Arm (claude-haiku-5-5)Cost / acceptedDurable-prose exclusionNote
lean_b_lite$0.0008036 / 6 (100 %)−237.4 output tokens [−442.2, −32.6] vs Control
Control (off)$0.0008676 / 6 (100 %)Default baseline (memory.lean_rules = false)
Ponytail$0.000871—External terse prompt arm
Caveman$0.001058—50.0 % task acceptance rate

Turn it on.

You need Footnote installed first: see install.

Filter

Adds the shell filter and read/budget hooks to your agents.

footnote install --lean

Audit

See what every turn sends before you type a word.

footnote audit-prefix --probe-mcp