Pramod Kumar and Raj Kumar Pandey re-price 600 public coding-agent runs to examine where optimization pays. Their starting point is prompt caching: a provider can charge less for the unchanged beginning of a repeated request. Sending the whole conversation again therefore costs less than treating every token as new input.
- Across two models and two agent frameworks, median tool responses contain just 118–286 tokens. Huge build logs appear near the largest one percent of responses.
- Under near-ideal simulated caching, 98.6% of input tokens are cached. Charging all input at the fresh-input rate overstates total modeled cost by about 7.1 times. At 75% cache efficiency, that gap falls to 2.4 times.
- Paying a smaller model to summarize tool responses costs almost the same as deterministic truncation across 20 tested combinations. The largest gap is 0.17 percentage points at the default prices. Whether summaries preserve more useful information remains untested.
- Turn count explains 84% of variation in log cost, compared with 4% for average tool-response size. That points toward studying unnecessary steps, while leaving open whether those steps can safely be removed.
Switching the main model can lose its warm cache. Asking a cheaper helper to summarize one tool response has different economics: the main model keeps its cache, and the shorter response saves money on later reads. Compare both with the actual cached price and a simple truncation baseline before building a complicated router.
Caveat: this is trace re-scoring, not a trial showing that fewer steps or deleted output preserve task success. The sample excludes some failed long runs, and the simulation omits cache expiry and eviction.