Skip to content
Tech News
← Back to articles

Show HN: Claude-thermos keeps your Claude session warm for you

read original more articles
Why This Matters

Claude-thermos is a tool that helps maintain the prompt cache for Claude sessions, preventing costly re-encodings during long interactions with subagents. This innovation reduces operational costs and improves efficiency for users running extended or complex workflows. It highlights the importance of cache management in AI service economics and performance optimization.

Key Takeaways

Stop paying to rebuild your Claude Code cache. When your main agent waits on a subagent for more than 5 minutes, its prompt cache silently expires, and the next turn re-encodes your entire conversation at the write rate instead of reading it back cheap. On long sessions with many subagents that's roughly 20% of your bill. claude-thermos keeps the cache warm so you never pay that tax.

Use

Run Claude Code exactly as you normally would, but through claude-thermos with uvx :

uvx claude-thermos # instead of: claude uvx claude-thermos -p " fix the bug " # any claude args pass straight through

Requires Python 3.11+ and the claude CLI on your PATH .

That's it. Warming runs automatically in the background. To disable it for a run without changing the command, set CLAUDE_WARMER_DISABLE=1 .

Tuning (all optional):

Flag Default Meaning --idle 270 Seconds the main agent must be idle before warming kicks in --interval 270 Seconds between warming cycles --max-cycles 4 Max warms per idle episode ( auto for unlimited) --subagent-window 540 Seconds a subagent counts as "still active"

Why your cache keeps expiring

Claude Code's prompt cache uses a 5-minute TTL. Every turn, your whole conversation history is served from cache at 0.1x the input price instead of being re-sent at full price, as long as the cache stays alive.

... continue reading