Coding agents burn tokens on raw tool output, repeated context, and forgotten decisions. Mega Saver compresses what the model doesn't need — without hiding what it does — across Claude Code, Cursor, Codex, and any CLI agent. Local-first. No account, no cloud.
import { createServer } from "node:http";
import { readFileSync, watchFile } from "node:fs";
import { parse } from "node:url";
// … 240 more lines of imports, types,
// route handlers, error mapping, tests …
export function createServer(opts) {
const app = http.createServer(handler);
app.listen(opts.port, "127.0.0.1");
return app;
}
// 3,981 tokens of file the model half-needs
createServer(opts) → binds 127.0.0.1:opts.port,
returns the http server. Imports: http, fs
(readFileSync, watchFile), url.parse.
Full output recoverable —
proxy_expand_chunk("cs_9f2", "0").
Every compression is measured. The dashboard turns saved tokens into a number you feel — and labels every dollar an estimate, because that's what it is.
Saved tokens are output the model never received, so — unlike a metered bill — they carry no prompt-cache discount to double-count. The dollar figure is estimated at a representative input rate and floored, never rounded up. Conservative by construction.
Every compressed result is expandable back to the complete, original text. Re-read an unchanged file and it returns a lossless pointer, not a re-summary. It saves tokens; it never blinds the model.
What Claude Code learns about your repo today, Codex, Cursor, and Aider inherit tomorrow — one approved, human-gated memory store shared across every agent through thin connectors.
No agent shows why a decision was made. Mega Saver does: which memory boosted a chunk, the ranking scores, the redaction — the causal chain behind every output, in the CLI and a graph.
No database, no account, no cloud. Secrets are redacted before anything is stored. The optional metering proxy records token counts only, over your own API key, on loopback.