Skip to content

v2.9.3 — Receipts, measured (not estimated)

Choose a tag to compare

@sravan27 sravan27 released this 26 May 16:24

The upgrade: measurement, not estimation

v2.9.2 credited a flat 8k tokens per hit. A sharp reviewer's first objection — "that number is made up." So it no longer is.

savings_tracker.py now reconstructs each prompt's first turn from the transcript and classifies it:

  • assisted — Claude's first tool action was a Read of a file auto_context surfaced, with no Glob/Grep first. An exploration replaced.
  • explored — it searched before finding the target. The exploration's token cost is read directly off the real tool_result sizes in your transcript.

Each avoided search is credited the measured average cost of an exploration in that same session — not a constant:

[context-os] receipt: 1 prompt went straight to the right file → ~5,000 tokens
saved (a search cost ~5,000 tok here, measured across 1 that still explored).
$ /savings
  Searches avoided            412   (opened the right file with no Glob/Grep)
  How it's measured
  A search cost        14,200 tokens on average — measured
                       from 287 of your own prompts that still explored
  100% of the savings above is measured this way.

Why it matters

This is the in-product, per-user version of the live A/B: not "trust our benchmark," but "here's what it saved you, measured on your repo." The per-search credit is clamped ≤15k (below the 21k aggregate the A/B measured) and sessions with nothing to measure fall back to a clearly-labelled 8k estimate — so the total under-claims, never over-claims.

Rigor

  • python/evals/runners/savings_test.py29 assertions: causal assisted-vs-explored classification, measured-vs-estimate per-hit selection, exploration-cost measurement from real tool_result sizes, session isolation, milestone, streak, fail-open on garbage/missing transcript, report rendering.
  • Wired into CI. ranker_floor still green — auto_context retrieval untouched.
  • setup.sh's embedded hook is byte-identical to the canonical source.

Install

curl -fsSL https://raw.githubusercontent.com/sravan27/context-os/main/setup.sh | bash