# Why 95%-Cached Coding and Security Agents Pay 10x Less on Prefix Caching Than Uncached Sticker Prices

> Source: <https://dev.to/nodecodeai/why-95-cached-coding-and-security-agents-pay-10x-less-on-prefix-caching-than-uncached-sticker-5h8o>
> Published: 2026-12-06 01:05:56+00:00

**Recommendation:** Benchmark agent session bills with prefix caching enabled instead of comparing uncached list prices, since cached input can dominate 96% of tokens.
More in the playbook "Controlling LLM cost": <https://wpnews.pro/playbooks/llm-cost>

When developers compare LLM APIs, almost everyone sorts by two columns: fresh input price and output price per 1M tokens. For one-shot chat prompts, that table works. For autonomous coding and pentest agents, it predicts the wrong winner almost every time.

In a multi-turn harness (Claude Code, Codex CLI, OpenCode, Strix, PentAGI), every step sends:

`N`
Across a real 14-minute Claude Code session we measured and published ([full token breakdown](https://nodecode.ai/research/claude-code-deepseek)), **96.5% of all input tokens were prefix cache hits**. Fresh input and generated output together were a small fraction of the total context processed.

Compare two backends serving 10M total input tokens (`9.5M` cached, `0.5M` fresh) and `100K` output tokens in a sustained tool loop:

| Component | Uncached-focused pricing ( `$0.80 / $0.40 cached / $1.50` ) | Cache-optimized pricing ( `$0.33 / $0.009 cached / $1.32` ) | 
|---|---|---|
| Cached input ( `9.5M` ) | `$3.80` | `$0.0855` | 
| Fresh input ( `0.5M` ) | `$0.40` | `$0.1650` | 
| Output ( `0.1M` ) | `$0.15` | `$0.1320` | 
| **Session total** | **`$4.35`** | **`$0.3825`** | 

On the same workload, prefix cache read pricing swings the bill by **more than 11x** - even though the fresh-input prices only differed by 2.4x.

`cache_salt` in the gateway keeps cache hits high per tenant while guaranteeing zero cross-org KV reuse, paired with a hard 30-minute idle KV eviction timer.
If you run authorized security harnesses or long-horizon coding agents on [abliterated AI models](https://nodecode.ai/abliterated), benchmark your actual session bill with cache hits turned on rather than comparing uncached list prices. You can inspect live agent-loop cost breakdowns with our [agent cost calculator](https://nodecode.ai/tools/agent-cost-calculator) or read the [Nodecode Cyber v1 specs](https://nodecode.ai/cyber).
