Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Benchmarks

One developer’s real command history, replayed on 0.7.5. Every figure below comes from the same run, including the ones that do not flatter us.

Corpus: 5,984 traces, 23,086,649 bytes, 2026-08-11 11:03:00 to 2026-08-14 18:11:10 UTC, all agent_id='claude_code', 123 terminal rows excluded from 6,107, 0 errored. Replayed in 1,238 s.

The headline

32.6% fewer bytes from the filters. 69.6% with the ledger. 23,086,649 to 15,557,823 to 7,026,021.

tokens, filters only7,682,124 to 4,874,124, 36.6%
bytes per token3.005 raw, 3.192 distilled (the shipped estimate is 3.6)
calls that saved nothing96.1%, 5,748 of 5,984
calls that shrank3.9%, 236
calls that grew0
ledger folds882 calls, 3,231 session markers, 86 project markers
raw bytes already shown once68.4% before filters, 64.7% after
that repetition, by scope67.3% same session, 1.1% earlier session, same project

Filtering and repetition are orthogonal. That is the argument for the ledger, and on this corpus the ledger is worth more than twice what the filters are.

Read the corpus before the number. This window is unusual and it inflates everything below. 148 of the 5,984 calls carry 64.7% of all bytes, 286 groups of byte-identical payloads account for 80.6% of the total, and the single largest contributor is five traces of exactly 820,000 bytes whose content is one sentence repeated to fill. It is the week this machine did nothing but develop and benchmark OMNI. A corpus of ordinary work reads far lower: the same harness on 6,656 traces in August 2026 read 2.7% and 14.9%.

Which commands benefit

classcallsinputfilters+ ledger
other3,70311.05 MB29.1%56.2%
file read (cat, sed, head, tail)88410.93 MB39.2%89.6%
search (grep, rg, find)600540 KB2.3%4.3%
git, gh696475 KB2.5%7.0%
infra (kubectl, az, docker)6570 KB0.0%6.8%
build and test3624 KB10.8%10.8%
aggregate5,98423.09 MB32.6%69.6%

infra reads 0.0% from the filters on purpose. It was 1.7% one release ago, bought by summarising kubectl get pods tables, which deleted the pod names that were the answer. That saving is gone and the rows are back (#562). What remains for infra is the ledger, which folds a listing the agent has already seen and needs the rows intact to do it.

By shell shape:

formcallsinputsaved
bare program78210,683,92440.2%
chain2,0249,843,90132.5%
cd prefix1,6551,476,7270.4%
VAR= assignment952567,1350.4%
pipe only571514,9624.6%

Top commands by input bytes, filters only:

commandcallsinputoutputsaved
tail4419,558,2725,599,66641.4%
zsh2828,391,1025,202,44338.0%
cd1,7271,503,8731,497,2940.4%
cat119770,972442,28542.6%
export535429,265428,7310.1%
grep447410,575402,8041.9%
sed217381,331381,3310.0%
git401262,113256,7862.0%
gh238145,950140,0954.0%
kubectl6871,12971,1290.0%

Byte-sink and token-sink rankings disagree at the tail: bash enters the token top 15 where kubectl sits in the byte one.

Head to head, one corpus

Identical bytes into every arm. Versions: rtk 0.45.0, lean-ctx 3.9.18, caveman 1.1.0 (binaries bin-v1.0.0), headroom at cross_turn_dedup.py.

bytessavedclaimed
rtk pipe23,086,649 to 21,655,2776.2%
caveman tools compress23,086,649 to 21,516,7576.8%
omni, filters only23,086,649 to 15,557,82332.6%
lean-ctx compress23,086,649 to 11,678,97549.4%425 of 5,984
headroom dedup, our filters23,086,649 to 7,905,76465.8%
omni, with the ledger23,086,649 to 7,026,02169.6%
rtk + our ledger23,086,649 to 8,906,37661.4%
caveman + our ledger23,086,649 to 8,844,10561.7%

headroom is 3.8 points behind our ledger and that is the only close race here. Both arms run the same filters over the same blocks, so the gap is the dedup engine and nothing else.

lean-ctx beats our filters by 16.8 points, 49.4% against 32.6%, over 425 calls to our 236. That is not argued away: this corpus is a few enormous repetitive payloads, which is exactly the shape a deep-and-narrow compressor is built for.

No lean-ctx + our ledger row: its preview reports compressed_bytes and never emits the text, so that row could only be estimated.

Single fixtures

From tests/fixtures/, same build, reproducible by hand. “Delivered” includes the marker.

commandinputdeliveredsaved
docker build (heavy noise)9,207 B102 B98.9%
cargo build (large, successful)3,220 B62 B98.1%
cargo test (490 passed, 10 failed)16,515 B1,153 B93.0%
git status (dirty)496 B165 B66.7%
git diff (multi-file)397 B247 B37.8%
kubectl get pods (mixed)840 B840 B0.0%

kubectl get pods reading 0.0% is the design, not a gap. For one release it read 73.5%, because a summariser that had been shadowed since #110 became live when #510 retired the TOML layer, and a 10 row table arrived as three lines with seven pod names deleted. A count of pods cannot be turned back into a pod name (#562).

docker build is the opposite case and worth the contrast: 251 lines of per-layer DEBUG and INFO become docker build: ✓ complete (50 layers, 50 cached), and the build did succeed. Noise, not an enumeration.

Method

OMNI_BENCH_DB=~/.omni/omni.db \
  cargo test --release --test bench_replay -- --ignored --nocapture
corpusexecution_traces.raw_input, real usage, replayed. Not synthetic
populationcalls whose result reached a model. OMNI_BENCH_ALL=1 widens it
statesession: None, store: None, HOME at an empty temp dir
pathrun_inner, the same pipeline the hook and omni exec run, markers included
binaryrelease build
armsOMNI_BENCH_RTK, _LEANCTX, _CAVEMAN, _HEADROOM, each off unless it names a binary, so CI never needs a competitor installed

Terminal output is excluded, and it is worth two different headlines. On an installation carrying it, it was 68% of raw bytes: 79.1% including it against 43.3% model-facing. The harness and omni stats both counted it until that was fixed, and both now print which population they used.

Every figure comes from one run. This file once published 15.7% and 16.1% from two replays a day apart without saying so.

Every window closes. execution_traces prunes at 7 days, so this corpus is gone a week after it was measured. Hold one open with OMNI_TRACE_RETENTION_DAYS.

Old figures are deleted, not kept for comparison. Releases keep changing the rule that decides whether the ledger folds a run, so an older number describes a pipeline that no longer exists, and printing both invites a reader to read two programs as a trend.

Latency was not re-measured on this build, so no table is printed rather than an older one relabelled. The method that produced the last one: median of 12 runs per payload, release binary, end to end through the post-hook, against a fresh database and a large one. Payload size barely mattered; database size did. Measure by removal, never with a microbenchmark: a unit-test timer once said 66 ms for work an A/B on the release binary put at 34.3 ms.

What no figure here can tell you

Whether the removed lines were signal.

Measure your own

omni stats
omni stats --share

Both read the same aggregation, so the share card cannot drift from the report. Terminal output is excluded from both.