piagent_
← ~/map

$ cat ~/map/pi-cache-lens.md

pi-cache-lens

Status-bar chip tracking per-request and session KV cache hit rates, with background forensics attributing every drop.

extensions✓ Oct 31

Facts

repository
github.com/w31r4/pi-cache-lens ↗
GitHub Stars
★ 0
Forks
0
license
—
npm / mo
—
last push
Oct 30, 2026

install

pi install git:github.com/w31r4/pi-cache-lens, then update anytime with pi update. The chip renders through the built-in pi footer automatically; pi-powerline-footer and pi-cc-extensions have documented integration snippets in the README.

## TL;DR

A zero-overhead pi extension that displays prefix KV cache hit rates for the latest request and the whole session in the status bar, and runs background forensics that attribute every cache drop — cold start, mutated tools, rewritten history, TTL expiry, model change, or gateway drift — using hashes and offsets only, never raw prompt text.

## Key points

## FAQ

Q Does pi-cache-lens add tokens or tools to requests?

No. It registers no tool schemas and never mutates outgoing requests; the chip and the forensics are computed from observed traffic.

Q Can it leak prompt content to disk?

The design says no: attribution persists hashes, byte lengths, and numeric offsets only, and raw prompt excerpts are never written.

Q What does the (!tools) tag mean?

The tool list or a JSON schema changed and triggered a cache drop; the record notes whether tools were added, removed, or modified.

Q Which providers are covered?

openai-responses, anthropic-messages, and openai-completions.

Q Does it work with third-party footers?

Yes. pi-powerline-footer and pi-cc-extensions have documented integration snippets, and the built-in pi footer works automatically.

## References

## Related entries

## Guides

Last updated: Oct 30, 2026