Skip to content

v2.9.2 — Receipts: make the savings visible

Choose a tag to compare

@sravan27 sravan27 released this 26 May 16:13

The addiction loop

auto_context saves ~40% of first-turn tokens — but silently. Invisible wins build no habit and earn no word-of-mouth. v2.9 closes the loop the way GitHub's contribution graph and Spotify Wrapped did: by making an accumulating quantity visible.

New surfaces

  • savings_tracker.py (Stop hook) — reads the transcript for files Claude opened, joins them against the suggestions auto_context logged that session, and credits each match as a hit (a Glob/Grep exploration the agent skipped). Maintains .context-os/savings/{ledger.jsonl,total.json}. Prints a one-line receipt at session end + a celebration when the running total crosses a milestone.
  • /savings — dashboard: all-time saved, this week, hit-rate, day-streak, dollar value, rate-limit runway ("~47 prompts before the window"), and a copy-paste shareable card.
  • statusLine meter — live 💰 2.3M saved · 5d🔥, reading the cached total. The ambient trigger.
  • auto_context.py logs each suggestion to suggestions.jsonl — data we control, robust against transcript-format churn.
$ /savings
  All-time saved      2,340,000 tokens  (~$14.04)
  This week             612,000 tokens  (~$3.67)
  Runway bought            ~47 prompts before the rate window
  Hits                        412  (files context-os surfaced that you opened)
  Hit-rate                    71%  ███████████████████░░░░░
  Streak                        5  consecutive days 🔥
  ╭─────────────────────────────────────────────╮
  │            context-os · receipts            │
  │  2,340,000 tokens saved                     │
  │  412 hits over 38 sessions                  │
  ╰─────────────────────────────────────────────╯

Honesty

A hit is conservative — a suggested file that was also Read, counted once per session. tokens-saved defaults to 8k/hit, under half the ~21k measured in the live A/B, so the running total under-claims. CONTEXT_OS_SAVINGS_PER_HIT tunes it; CONTEXT_OS_SAVINGS=0 disables. Local-only, no phone-home.

Quality

python/evals/runners/savings_test.py — 17 assertions (hit detection, no over-count, session isolation, path normalization, milestone crossing, streak math, fail-open on garbage/missing transcript, empty-state report). Wired into CI. ranker_floor still green — auto_context retrieval unaffected.

Install

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

Adds the Stop hook, the /savings command, the report backend, and the statusLine meter. 7 Python hooks, 12 slash commands, 29 techniques.