DNA News

Act on this, mostly signal

kvleak finds 20.7% of Claude Code input spend lost to cache rebuilds

What to do

Run pip install kvleak on your Claude Code, Codex, Gemini CLI or OpenCode session files.

Why

A 95.4% cache hit rate hid the loss, mostly from idle gaps that outlive the cache TTL.

Read the source at github.com

What the research found

kvleak is an open-source, no-API-key CLI (pip install kvleak) that audits Claude Code, Codex CLI, Gemini CLI and OpenCode session files and finds that a 95.4% cache hit rate hid 20.7% of input spend lost to cache rebuilds, mostly from idle gaps outliving the cache TTL.

Claims and how well the evidence supports them

  1. Claude Code cache hit rate was 95.4% while 20.7% of input spend went to cache rebuilds in the maintainer's sample 98%
  2. kvleak installs with pip install kvleak or pipx run and needs no API key, config or network calls 98%
  3. Idle gap outlived the cache TTL caused 69.2% of leaked cost in the maintainer's sample 98%

Evidence

Actionability rated medium.