pi-diagnostics
Prompt-cache diagnostics and expiry reminders for pi
Package details
Install pi-diagnostics from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-diagnostics- Package
pi-diagnostics- Version
0.3.2- Published
- Sep 28, 2026
- Downloads
- 631/mo · 631/wk
- Author
- tianrendong
- License
- MIT
- Types
- extension
- Size
- 75.8 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts",
"./src/expiry.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-diagnostics
Know why your prompt cache missed, and when it's gone.
Cache-miss reasons. When a turn re-bills cached tokens, see the provider's explanation (Anthropic, OpenAI):
Cache miss: 42k tokens re-billed (~$0.12) ↳ Provider diagnostics reason: tools_changedExpiry reminders. A note appears when your cache has likely expired, so you know it's a cheap moment to
/compact, switch models, or change tools.
Both are display-only and never add to model context.
Install
pi install npm:pi-diagnostics
Run /diagnostics to see recent results.
License
MIT