r/devtools • • 27d ago

How I checked that a token-saving proxy for coding agents was not quietly making answers worse

The obvious question about any tool that trims what a model sees is whether the answers get worse. I build a local proxy (probe0) that sits under Claude Code and Codex and logs every request, and that question ended up being most of the work, so here is how I handled it.

The rule: any change that alters the bytes the model receives does not go on by default until it passes a blind check. Changes that only alter timing, like when the prompt cache gets refreshed, skip that, because the model gets the exact same request.

What the testing looked like:

  • Live answers, not synthetic ones. Answers with and without a change, judged blind, so the judge did not know which version produced which. 314 answers went through that before anything was turned on by default.
  • Objective checks where possible. For coding turns a test either passes or it does not, which is a lot harder to argue with than a preference score.
  • Reasoning effort surprised me. On tool heavy turns I ran 25 prompts at three effort levels, and all 17 objective checks passed at every level, while the lower levels used way less.
  • Same story for easy turns ("read this file", "run the tests") on a cheaper model. Sending them to Sonnet instead of Opus scored the same on the objective checks.

How it is built: TypeScript on Node, running locally on a Mac. It trusts a root certificate so it can read your own agent's HTTPS traffic, and nothing about prompts or code leaves the machine. Mac only, free beta, and probe0 uninstall removes all of it. Replaying 12 days of my own traffic, the default settings cut the bill by 12.8%, which is one person's numbers, not a promise.

Question for anyone building tooling around LLM calls: how are you catching quality regressions? Blind judging feels softer than I would like, but writing objective checks for every kind of turn does not scale either.

Numbers and method: https://probe0.xyz/benchmarks?utm_source=reddit&utm_campaign=devtools

Terminal install if you want to try it: curl -fsSL https://probe0.xyz/install | bash

2 Upvotes

6 comments sorted by

1

u/Armannss 27d ago

I would distinguish replaying individual requests from letting the agent finish a task with the change enabled. If each recorded request is replayed independently, later requests still contain history produced by the original agent. That can miss a quality regression where one compacted tool result changes which file the agent opens next.

A small closed-loop suite could start each condition from the same repo commit and task, then let the agent choose its own tool calls. Grade the final patch with held-out regression tests and include correction/retry cost. Run compaction and model routing separately first, so a failure can be attributed to one change.

For the broader traffic sample, I would keep blind judging but report results by task category and count independent tasks, not only answers; several turns from one session are correlated. Are the 314 answers mostly individual-turn comparisons, or do some cover full tasks through the final diff and tests?

1

u/awesomebirder 26d ago

fair hit. the 314 are counted as answers, not tasks, so your correlation point stands and i should report by task and category instead of a pooled number.

the trajectory problem is real for compaction specifically. a folded tool result can change which file it opens next, and per-request replay will never see that because the later turns still carry the original history. timing changes dont have that issue since the bytes are identical.

closed loop from the same commit, held-out tests on the final patch, retry cost counted, one change at a time is the right shape. going to set that up for compaction first since its the riskiest one.

1

u/Armannss 26d ago

Starting with compaction makes sense. One focused regression case I'd add: a long tool result with the decisive evidence in the middle, such as a failing assertion surrounded by passing tests. The task should require acting on that evidence, and the hidden check should catch the wrong fix even if the agent's explanation sounds plausible.

I'd also log which tool results were actually compacted. Otherwise a passing task might never exercise the feature you're evaluating. For the first small suite, a per-task table of final test outcome, total cost including retries, and whether compaction fired would already be useful. Would be interested to see those results when you have them.

1

u/awesomebirder 25d ago

good case, adding it. the one session-level check i have run so far was resuming 7 real sessions, still one answer per session, and that is what caught a compaction lane making the model invent code it had written earlier, so that lane stays off until the closed-loop suite passes. logging whether compaction fired per task is a good call, otherwise a pass on a task that never triggered it tells me nothing. a per-task table with outcome, cost incl retries and fired yes/no is the plan, will share it when its done

1

u/Armannss 25d ago

damn, making up code from the previous session is bad 😂 send the results when you have them dude

1

u/awesomebirder 25d ago

yeah it was a good catch to have before anyone else hit it. will post the per task table here once the whole task runs are done, your buried failing assertion case is going in