Devotd Github
NewCoding agents

shangliy/kvleak v0.12.0 — Prompt Cache Cost Analysis Tool

kvleak is a Python tool that analyzes coding tool session logs to show prompt cache reuse and rebuild costs.

Repositoryshangliy/kvleak ↗

kvleak is a Python tool that analyzes coding tool session logs to show prompt cache reuse and rebuild costs.

GitHub description: Cut Claude Code token cost: find where your prompt-cache money leaks and fix it with one command. Also Codex CLI, Gemini CLI, OpenCode.

stars
★ 3
Forks
1
Language
Python
License
MIT
Latest release
v0.12.0
Read original source ↗View on GitHub ↗

shangliy/kvleak is a Python tool that analyzes prompt cache reuse and rebuild costs from the session logs of coding tools. The latest release is v0.12.0. The provided information contains no changelog for this version, so no newly added or changed features can be confirmed. The repository focuses on finding where cache costs occur, based on the records that coding tools such as Claude Code leave on the local machine.

Instead of only checking whether the cache hits, the tool splits usage by session and model calls to examine rebuild costs. According to the README description, it shows cache losses arising from idle time, new sessions, subagents, and similar sources. It also covers logs from multiple agents and the JSONL format, and you can try to improve things by tuning configuration and installing hooks. It provides a status line and a prediction feature, and notes that there is a command to revert changes. Codex CLI, Gemini CLI, and OpenCode are also covered. It explains that analyzing log files requires no API key, network connection, or external dependencies. The license is MIT.

However, it has not been confirmed how much the cache loss analysis actually translates into cost savings. No validation results backing performance or savings figures are given either. Therefore kvleak can be regarded as an analysis tool for finding cost causes in session logs, but there is not enough grounds to accept it as a means of guaranteeing expected savings.