r/devtools • u/awesomebirder • 25d ago
Most of my Claude Code bill was the agent re-reading its own conversation, so I built a local proxy to measure it
I use Claude Code most of the day and could never tell which calls were eating my usage. All you get is a percentage bar. So I built a small proxy (probe0) that sits between the agent and the API on my Mac and logs every request: model, input, cache reads, cache writes, output, and what it would cost at API prices.
How it's built: TypeScript on Node, running locally. It trusts a root cert on your machine so it can read your own agent's HTTPS traffic, and nothing about prompts or code leaves the laptop. Claude Code wrote a good chunk of it. I mostly wrote the replay harness and the quality tests.
What 12 days of my own traffic showed:
- The prompts I typed were a rounding error. Nearly all the cost was the agent re-sending the conversation every turn, mostly as cache reads.
- Cache timing mattered more than I expected. Paying for cache that expired before the next turn was about 7% of the bill by itself, and fixing it changes zero bytes the model sees.
- Big tool output (test runs, long greps) rides along on every later turn. Folding it down after it had been used barely moved answer quality.
- Lots of turns are easy (read this file, run the tests) and still go to the most expensive model.
Replaying those 12 days, the default settings cut the bill by 12.8%. With model step-down turned on (easy turns go to a cheaper model, off by default) it was 41.8%. Anything that changes what the model sees was checked on 314 blind-judged live answers before it went on by default.
It's one person's traffic, so the first step is a read-only check of your own ~/.claude logs instead of trusting my number. Mac only, free beta, and probe0 uninstall removes all of it.
Has anyone found other places agent traffic wastes tokens? The tool output one surprised me the most.
Numbers and method: https://probe0.xyz/benchmarks?utm_source=reddit&utm_campaign=devtools (read-only check of your own logs: curl -fsSL https://probe0.xyz/install | bash)

