
- Category
- AI
- Website
- github.com
- Language
- English
- Listed
- Jul 24, 2026
- Stars
- 227
- Forks
- 12
izeigerman/claude-thermos ↗, Python, MIT, Last commit Jul 27, 2026
Claude Code caches the conversation prefix for five minutes. When the main agent sits idle waiting on a subagent that runs longer than that, the cache lapses and the next turn re-encodes the whole history at the write rate. claude-thermos is a Python wrapper that keeps the clock from running out.
Run uvx claude-thermos in place of claude and the CLI comes up behind a local reverse proxy, watching /v1/messages traffic to tell the main agent's cache prefix apart from its subagents', then replaying the last real request with max_tokens set to 1 to refresh that prefix. A claude-thermos serve daemon does the same on a loopback port, so the VSCode extension and several terminals share one warmer. Idle threshold, warming interval and cycle cap are adjustable, and every session leaves an event log plus a tally of tokens saved. The author measured roughly 185 of their own local sessions and put these rebuilds at about 22 percent of the bill. Requirements stop at Python 3.11 or newer and the claude CLI on your PATH; the code is MIT licensed.