replay.doctor
replay.doctor audits silent prompt cache misses in AI agent transcripts and names the turn the cache broke on.
Last verified:
What is replay.doctor?
replay.doctor is a local diagnostic tool that analyzes Claude AI session transcripts to identify prompt cache breaks, their causes, and the exact tokens re-billed at write prices. It helps developers understand unexpected API bill increases by showing cost per task, which turns broke the cache, and what changed between them.
replay.doctor pricing
Pricing model: Freemium
Free (open source)
replay.doctor pros
- Runs entirely locally—nothing leaves your machine
- Open source with multiple installation options (direct binary, GitHub release, or Go install)
- Identifies exact turns where cache breaks occurred and their root causes (tool changes, TTL expiry, etc.)
- Provides detailed cost breakdown: median task cost, p90 task cost, and total avoidable re-billed tokens
- Can contribute anonymized metrics (<600 bytes) to a pooled dataset to help others understand usage patterns
replay.doctor cons
- Requires manual interpretation of cost data and understanding of prompt cache mechanics
- Data contribution is manual (you read the file and post it yourself; the binary cannot send)
- Designed for advanced use cases (Pro/Max seats, metered API, unattended runs)—simpler use cases may not need it
- Population data currently limited to single-machine baseline; pool contributions still relatively small
Frequently asked questions about replay.doctor
What exactly is re-billed?
Tokens are re-billed when a prompt cache breaks mid-session. The tool measures how many tokens were written twice and at what cost—this is money already spent, not a forecast.
Who should use this?
Users on Max seats hitting usage windows, those with metered APIs, unattended runs, or sub-agents. Pro seat users can reduce re-bills by setting promptCacheTtl to 1h and keeping tool list stable.
What does Replay Doctor actually report?
It names the turn where cache broke, what caused it (e.g., tool addition/removal), the tokens it cost, and provides cost statistics across all sessions.
Is my data private?
Yes. The tool runs locally and writes only 16 counts, 3 metadata strings, and no file paths. You read the file before posting it, and the binary never sends data.