Skip to content
Empryo

Prompt cache and ping

See how long the prompt cache lasts on desktop, in the terminal and on the phone, keep a lane warm while idle, and find out why a cache broke.

How it works5 minutes to read
Copy & share
On this page5 sections

Prompt caching lets a provider reuse an unchanged part of your request. It can reduce repeated input cost and latency. It does not save your conversation or replace sessions.

See the countdownLink to this section

Open /cache in the terminal for live cache information and retention controls. TTL means time to live: how long the provider is expected to retain cached context. Support and duration depend on the model and provider. A countdown is not a promise that the provider will serve a cache hit.

On desktop, click Cache in the status bar:

ControlWhat it does
CountdownTime left in the provider's cache window since the last hit or write
Keep forHow long the cache is kept from the next request, when the provider offers a choice
Auto-prewarmWrites the cache while you type, so your next message starts warm. On by default (cache.prewarm)
Warm nowSends one small request to warm it at once. It may use credits or quota

A ChatGPT sign-in for Codex shows no expiry, because that cache is tied to the session.

Keep a lane warmLink to this section

After a conversation, enable idle cache refresh for that tab:

text
/ping start

/ping also starts it. Stop it with:

text
/ping stop

Empryo refreshes supported lanes before their known cache lifetime expires. Normal work takes priority. A model change can reconfigure or stop keepalive if the new model does not support it.

Keepalive makes provider requests and can cost money. Use it when you expect to return soon, not as a way to keep every tab alive indefinitely. It cannot guarantee retention during sleep, disconnection or provider failure.

Ping confirms when idle cache refresh is enabled for the current lane.
Ping confirms when idle cache refresh is enabled for the current lane.

Message threadsLink to this section

On Claude (API key or subscription), Message threads sends only what is new since the last step: the latest tool results or your message, plus the id of the previous reply. Anthropic keeps the rest of the conversation for 5 minutes after each request. Turn it on under Claude → Prompt cache in the provider options, or with cache.threads: true. It is off by default.

OffOn
Token cost and cache hitsSameSame
Data sent over a 50-step session to ~1M tokens~60 MB~2.3 MB
First token above 500k tokens~3.8 s~3.2 s

Measured on Claude Haiku 5.5, 50 steps up to about 970k tokens of context. Below about 300k tokens the first token did not arrive sooner. Threads help most on slow uploads and very long sessions.

A new thread starts whenever the history, the system prompt, the tools, the model or the effort changes, after a compaction, and after 5 minutes idle. Those requests send the whole conversation, as they would without threads.

When the cache breaksLink to this section

Every request is compared with the previous one before it leaves. When the cached prefix cannot be reused, the tab shows a notice that names the cause and the exact edit, for example:

text
Cache broke · system prompt changed (block 3/3 text, −322 chars) · 290k re-written ≈ $1.09 · text after «callable by name with run_tool(…): advisor, »: −"computer, computer_act, …" · evidence 2026-10-01T00-45-39-120Z-system.json
Cache broke · system prompt changed (block 3/3 text, −30 chars) · 290k re-written ≈ $1.09 · text after «Key dependencies: react: 72»: −"4 files" +"3 files" · meanwhile: agent rebuild requested: live config change (taskRouter) (just now); genome map re-rendered (cold refresh) → epoch 3, 57,241 chars (just now) · evidence 2026-10-01T01-57-00-390Z-system.json
Cache broke · msg 178/199 EDITED (assistant: reasoning + tool call explore_script, part 1/2 reasoning, +2,978 chars) — history must be append-only · thinking after «…the user wants»: +"…" · flipped back to a version already sent (×2) — a per-request rewrite of this message is not stable · evidence 2026-10-01T00-51-02-004Z-messages.json
  • system prompt changed names the block (on the Claude subscription lane, block 3 is Empryo's own instructions; the first two are the lane's attestation). On OpenAI-shaped lanes the system prompt travels as message 1, so the same change reads msg 1/N EDITED (system …).
  • tool schema changed lists the tools added (+), removed (−) or changed (~).
  • msg N/M EDITED means an earlier message was rewritten in place. The field (text, thinking, signature, input) and a short excerpt follow. flipped back to a version already sent means the same message keeps alternating between two forms, which points at a per-request transform rather than a one-off edit.
  • meanwhile: lists what the engine did between the two requests, oldest first: agent rebuild requested: live config change (taskRouter), genome map re-rendered (cold refresh) → epoch 3, instruction files reloaded (project file changed). The step that explains the break is in that list.
  • The evidence file in ~/.empryo/logs/cache-breaks/ holds the full before and after of what changed, plus the same meanwhile list (the last 40 are kept).

On the phone, the status sheet lists the last few breaks of a chat, one line each. Tap one for the full report.

A notice that starts with Cache re-written on purpose or Cache expired is expected: a compaction, a /clear, or an idle window longer than the provider's retention.

Choose the right controlLink to this section

You want toUse
Inspect retention and countdown/cache, or Cache in the desktop status bar
Keep the current lane warm while idle/ping start
Stop idle refresh/ping stop
Check actual spend/usage
Recover an earlier conversationCtrl+P

Compare actual usage before and after enabling it. A warm cache is useful only when its savings exceed the refresh cost.