How it works
Where your tokens actually go — and how we hand them back.
Hypermile sits between your coding agent and the model as a small local proxy. It trims the noisiest parts of each prompt before they reach the API, keeps every original on your machine, and is careful not to break the discount you're already getting.
Why every turn re-bills the whole conversation
A coding agent talks to a stateless API. The model remembers nothing between calls, so to continue a conversation the agent resends the entire history — every earlier message, every file it read, every log it captured — on each turn. Turn 20 pays for turns 1 through 19 all over again, plus whatever just happened.
That's fine when the history is small. It stops being fine the moment a test run dumps thousands of lines into the context, or the agent re-reads the same module for the ninth time. Those tokens don't get billed once — they ride along on every subsequent turn until the conversation ends. A single noisy afternoon quietly eats a slice of your weekly cap, not just today's window.
A local proxy on your machine
Hypermile runs a small proxy on your own computer. Point Claude Code or Codex at it (the app writes the wiring for you, backs up the config first, and removes it cleanly on uninstall) and every request flows through Hypermile on its way to the real API. Nothing about your account changes. Your code, prompts, and tool output never leave the machine — Hypermile is local, not a cloud service, and this website has no account and no database at all.
What gets trimmed — and what doesn't
The wins come from the noise around your work: bulky tool results, repetitive logs, markup from fetched pages, and old output that isn't being discussed anymore. Source code is left alone on purpose — squeezing code is where these tools get themselves in trouble, so Hypermile passes it through untouched.
Everything that gets rewritten stays retrievable. Originals live on your disk, the model can pull any of them back when it needs the full detail, and the app's inspector lets you see before and after and restore anything in one click. Compression that guesses wrong is only acceptable if it can be undone — and it can.
Why we're careful with the prompt cache
Anthropic and OpenAI both discount cached context: if the start of your prompt matches the previous turn, that shared prefix is billed at a fraction of the normal rate. Long agent conversations lean on it heavily.
Rewrite history carelessly and you can quietly break that discount — a tool can show fewer visible tokens while the broken cache makes the turn cost more. Hypermile is built so compression doesn't throw away savings you'd have gotten cheap anyway. That's the trap we designed around; the details stay in the product.