Cache Warmer
Fork-based prompt-cache warmer for Claude Code. Keeps long sessions warm in the Anthropic prompt cache without modifying them: idle sessions nearing cache expiry are warmed through disposable interactive forks, with per-warm cache_read receipts proving each refresh worked.
- Zero session impact — live transcripts verified byte-identical before/after warming
- Empirical TTL measurement from session history (measure-ttl.py, zero API spend)
- Self-verifying: every warm logs the measured cache_read token count
- Disproved two naive approaches empirically (print-mode pings, local heartbeat files)
- ~20x cheaper resume on large sessions vs paying a cold cache re-write
Activity Timeline
Fixed fallback interaction guards, honest cap reporting, capture store consolidation, human-turn counting, and malformed session-id rejection. Install script updated to v3; v2 explicitly refused at entry.
Replay warm generation now caps output. Capture retention enforcement wired into proxy independent of ENABLED status.
Proxy's 404 on RC availability checks caused silent session deregistration from the bridge. Workaround: unset ANTHROPIC_BASE_URL before RC session registration. Full fix (true reverse proxy + Account B opt-in warming) specified, awaiting test pass with throwaway session.
Reliability patch applied after review hardening. Transient failures were causing chain breaks that interrupted cache warming sequences.
Fork-warming deprecated in Claude Code ≥2.1.198. v3 replay is now the primary mechanism. Clean architectural succession.
Fork startup prompt handling added for large MCP sessions; busy and remote-control session behavior improved. End-to-end testing passed with transparent cache refresh and no session state side effects.
Investigated a pending cache-warming idea, measured the effective prompt-cache TTL (~1h cliff) from session history, discovered that print-mode pings cannot refresh an interactive session's cache, and landed on disposable interactive forks as the zero-impact mechanism. Published to GitHub with a TTL measurement tool and systemd timer install.