Thrift wraps your Claude / agent sessions and strips the dead weight — duplicated file reads, giant tool logs, repeated reminders — then proves your agent didn't get dumber. Lower bill, same output.
npx tokenthrift analyze session.json
Open source · Runs locally — your code never leaves your machine · We measure quality, not just savings
We measured it — savings and quality.
12 fixtures reproducing the redundancy in real agent sessions (164,008 tokens, o200k tokenizer). Synthetic fixtures, clearly labeled; real-task benchmarking is the next milestone. Reproduce with npx tokenthrift benchmark.
SAFE MODE · lossless-ish
55.8% fewer tokens
dedup + tool-log trimming + whitespace
AGGRESSIVE · opt-in
68.2% fewer tokens
+ stale-turn compaction (marked)
QUALITY · the honest part
100% info kept
non-tool content preserved in safe mode
fixture type
before (tok)
safe
aggressive
coding session (re-read files, test logs)
13,635
45.7%
71.0%
research session (web dumps, dup fetch)
13,618
73.4%
73.4%
agent loop (repeated context reads)
13,765
49.4%
56.6%
Safe mode preserves 100% of unique non-tool information (instructions, code, reasoning). Tool-log middles are trimmed head+tail and flagged (≈63% of tool-output tokens). Duplicate blocks become recoverable pointers — no unique info lost.
How much are you overpaying?
Most AI bills are high because of context bloat, not intelligence. Estimate your reducible spend.
Estimated saved / month
$446
Saved / year
$5,357
Estimate only. Defaults to the safe-mode fixture result; slide for your own assumption.
How it works
1 · WRAPOne command sits in front of your session or transcript. No re-architecting.
2 · OPTIMIZEDedup repeated blocks, trim giant tool outputs to head+tail, normalize whitespace — and (opt-in) compact stale turns.
3 · PROVEReports exact tokens and dollars saved, and flags anything lossy so you stay in control.
Why not just use the built-ins?
/compact compresses one chat. Caching reuses one call. Thrift is the layer that decides which trick to apply when across the whole workflow — and verifies you didn't lose quality. The platform gives you levers; Thrift pulls the right one automatically.
Pricing
Free forever
$0
OSS CLI · dedup, trimming, compaction · live savings report.
Pro · early access
$12/mo
Team dashboard, budgets & alerts, quality-delta reports, runaway-loop detection.
Metered
% of savings
Route product traffic through the Thrift gateway. Pay only a slice of what you save.
Get the benchmark + early access
Drop your email for the full method, the per-trick leaderboard, and a Pro founding-user invite.
No spam. The honest "does saving tokens make your agent dumber?" report is the first email.
FAQ
Will it make my agent dumber?
Safe mode preserves 100% of unique non-tool information (measured). It only trims tool-log middles (flagged, head+tail kept) and dedups exact repeats into recoverable pointers. Aggressive compaction is opt-in and marked.
Does my code/data leave my machine?
No. The CLI runs locally; nothing is sent anywhere you don't configure.
Which agents/models?
Works on any chat transcript or text today. Claude Code session hook is next; model-agnostic by design.
Isn't Anthropic going to build this in?
They ship primitives; Thrift orchestrates them and verifies quality. More primitives = more for Thrift to pull.