Reddit
claude-thermos: A Reverse Proxy That Keeps Claude Code's Prompt Cache Warm, Reclaiming ~20% of a Long Session's Bill
Posted to Show HN July 24 (104 points, 83 comments), claude-thermos targets a failure mode specific to multi-agent workflows: when a main agent waits on a subagent for more than five minutes the prompt cache TTL expires, and the next turn re-encodes the entire conversation at cache-write rates instead of the cheap read rate. It launches Claude Code behind a loopback reverse proxy via ANTHROPIC_BASE_URL and, on an interval under the TTL, replays the last real request with max_tokens: 1 and no streaming to refresh the identical cacheable prefix. Usage is `uvx claude-thermos`, and the author puts the recovered cost at roughly 20% of the bill on long subagent-heavy sessions.
↳ Follow the thread