Hermes Now Spends Your Idle Minutes Well: Warm the Cache, Shrink the Chat, Archive the Rest


It’s Friday afternoon. You leave a two-hour debugging conversation open, grab lunch, sit in a meeting, and come back a bit over an hour later. Hermes answers fine — but if you look at the usage line, that one reply cost almost as much as the whole conversation did the first time. The prompt cache expired while you were away, so the model had to read everything from the top.

That isn’t a quirk of one model. Caches have a lifetime and people take lunch breaks. Hermes used to just show you when the cache expires and leave the timing to you. Now it acts on that clock itself: it keeps the cache warm while doing so is cheaper than re-sending, and when warming stops paying it makes the conversation smaller.

The bill nobody looks at: being idle is not free

The pricing model is simple. Writing a cache is expensive; reading it is cheap. The same prefix, sent again inside the window, is billed as a cache read — often an order of magnitude less than the first send.

The window is the problem. Anthropic-spec caching comes in 5-minute and 1-hour tiers; OpenAI-spec routes are generally estimated at 30 minutes, renewed by each hit. Cross the deadline and the next request is a full write again, and every saving you built up is gone.

So the real waste happens while nobody is typing. You ask nothing, and the cache cools anyway. Your first sentence back triggers a full re-read.

Four steps: warm, compact, archive, return cold

Hermes now treats an idle conversation as an object with a lifecycle and runs four steps in order:

  1. Warm. Shortly before the cache would expire, it re-sends the last request with the output capped as low as it goes (1 token, or 16 on GPT-5/o-series). That send is cheap; what it buys is another full window.
  2. Compact. When warming no longer pays and the conversation is genuinely large, it compresses at the cache edge — summarizing the middle so the next request starts from a shorter prefix.
  3. Archive. If compaction doesn’t fit either (the context isn’t big enough, or it hasn’t reached the compression threshold), the cache is allowed to expire and old tool output is lifted out of the conversation: written to disk byte for byte, with a pointer left in its place.
  4. Return cold. Your first request after the break meets a conversation that is already smaller, not the same wall of text.

Step 1 is not blind renewal. Every keep-alive is priced against the rewrite it prevents, and a route with unknown cache prices is simply not warmed. Each of your messages funds at most three idle keep-alives; past that, steps 2 and 3 take over.

Two real misses and warming stops

The dangerous case is believing you renewed something you didn’t. If the upstream never actually served the cached prefix, the keep-alive was pure spend.

So the rule has teeth: two consecutive real misses on the same route (same upstream, confirmed by the response’s upstream field or its id family), or three misses of any kind in a row, disable warming for that route for the rest of the session. Only a route switch or /new clears it. /context shows warming_off while it holds, so you can see exactly why the warm-ups stopped instead of guessing.

That’s the difference between this and a cron job that pings your chat every few minutes: a dumb ping keeps paying after the cache is already broken. This one admits the miss and stops.

Compaction and archives: old tool output moves next door

The space is rarely your questions. It’s tool output — a search_files sweep, a build log, a fetched page, thousands of tokens each. Useful while the model was reasoning about it, dead weight ten minutes later.

Every compaction now writes the original tool results it removes or shortens to cache/pruned/ under the Hermes home, byte for byte, and replaces the row with a short stub pointing at the file. If the agent genuinely needs the original later, it can read it back. Nothing is lost; it moved.

Two boundaries are worth knowing:

  • Only the local terminal backend archives. On sandboxed backends (docker, ssh, modal, daytona) the model cannot read host files, so the row is shortened to a plain one-line stub and no archive is written.
  • A failed step never leaves a half state. If the summary fails, no archive is written. If the archive write fails, that result stays whole and compaction continues. Slightly more context is better than a broken record.

Route changes get the same treatment: a /model switch or a fallback makes the cache worthless by definition, so old history is pruned before the first request on the new route — you never carry a large stale transcript into a cold cache.

The only knob you might touch

If you want the background first, we covered the cache countdown and compaction in a single call.

Most people need to change nothing. The default is auto:

prompt_caching:
  cache_ttl: "auto"   # auto | 5m | 1h

auto reads the pace of the conversation. Human-paced chats — you, in a terminal, one message at a time — take the 1-hour tier. Machine-paced sources (cron, subagents, webhooks, kanban, batch runs) take 5 minutes, because they never “step away for an hour”; handing them a 1-hour window is pure waste.

Pin 5m or 1h only if you know your own pattern better than that heuristic. The startup line (💾 Prompt caching: ENABLED (...)) and /context both tell you which tier is actually in force.

What it saved: a replay of a real bill

When the change merged, the team replayed 2.54 days of real traffic — 21,157 API calls across 327 sessions, all on Nous — pricing every call under the old rules and the new ones. Spend fell from $2,023.92 actual to a modeled $1,806.95, about 10.7%; scaled to recent usage that is roughly $3,196 per 30 days.

Be clear about the composition: about $75 of the $217 comes from compaction and archiving, which are modeled rather than measured byte for byte. Most of the rest comes from no longer paying a 1-hour premium on conversations that never pause, and the rule still holds up when 5% of keep-alives are simulated to miss. These are the project’s own numbers from the pull request, not an independent audit — but the direction and the order of magnitude are solid.

What you’ll actually notice

  • After an hour away, the first reply is cheaper and the context is compacted rather than re-read.
  • warming_off occasionally appears in /context — that route’s cache was judged unreliable and Hermes stopped spending on it.
  • On docker or ssh backends, compaction leaves no pointer files. Expected, not broken.

If you pinned cache_ttl: "5m" months ago to keep costs predictable, try auto again. Machine-paced jobs still get 5 minutes; your own chat upgrades to 1 hour at its first real pause.

The takeaway

A cache isn’t “on” once you enable it. It has a lifetime, and human work is slower than that lifetime. What landed here isn’t a model parameter — it’s a plain judgment call made every few minutes: is it still worth paying to keep this alive, or is it time to admit it went cold and make the conversation smaller? For anyone who lives in long sessions, that judgment shows up on the bill faster than any model upgrade.