Skip to documentation content
Pomegr
On this page

Concepts

Cache reuse

Prompt caching lets a provider reuse its processing of the unchanged beginning of a request instead of processing it again. Pomegr shows the counts the provider recorded, marks sharp drops in reuse, and labels every explanation as an observation or an inference. It never inspects, refreshes, or clears the provider's cache, and it does not show what a drop cost.

Read reuse

A request's Cache read is the part of its prompt input the provider read from its cache; see Context and tokens for the labels. On the Activities tab, Full breakdown stacks Cache read in each bar of the Requests chart. Once a conversation is cached, each request re-reads that prompt, so most of a typical bar is Cache read.

Spot a possible full refill

A refill happens when the provider writes most of the prompt into its cache again instead of reading it. Pomegr marks Possible full refill only when two adjacent requests from the same agent and model, with no recorded compaction between them, meet all four checks:

CheckEvidence required
Input sizeBoth requests have at least 8,000 prompt input tokens.
Reuse beforeThe earlier request read at least 80% of its prompt input from cache.
Reuse at the dropThe later request read at most 10%.
Write at the dropThe later request recorded at least 8,000 Cache write tokens.

A conversation's first request writes a large cache but has nothing earlier to compare, so it is not marked. The two captures below show one request in both chart modes.

The Requests chart in Fresh tokens for one Claude Code subagent, requests 63 to 101: bars are almost flat except request 93, a tall Cache write bar of about 250K tokens under a dotted marker labeled Possible full refill.

A real recorded Claude Code session in the Pomegr project. In Fresh tokens, which leaves out Cache read, request #93 is one tall Cache write bar under the dotted marker. The other bars in this agent's lane are small.

The same requests in Full breakdown: every bar is almost entirely Cache read except request 93, which is mostly Cache write and sits under the Possible full refill marker.

The same requests in Full breakdown. Before and after #93 each bar is almost entirely Cache read. #93 is mostly Cache write instead, so reuse dropped and then returned.

To see any explanation Pomegr can support, hover or focus the affected bar. A small tooltip above the refill marker gives it in a sentence or two. The refill icon on an agent's row in the Agents tab opens a popover with the full evidence. Each explanation is labeled by its source:

  • Provider diagnostic. Claude Code can record that the model configuration, system instructions, tool definitions, or message history changed. The popover lists the reason, or "reason unavailable".

  • Inference. Pomegr reads recorded structure and timestamps. It is not a provider statement. For Claude Code, it can show these:

    • Cache lifetime elapsed. No recognized diagnostic explains the drop, and more time passed than the preceding request's recorded lifetime. For example, "Five-minute cache likely expired; 7m elapsed since the preceding request." The time is measured between when the two requests were sent. A cache that expired while a long-running request was still being answered is therefore seen.

    • Tool definitions loaded. A tool search was followed by newly recorded tool definitions, and the next request reported changed tool definitions. For example, "tool definitions loaded after a tool search (8 added)". It gives a count, not tool names, and it does not prove the new definitions caused the refill. The popover links the related upstream issue, anthropics/claude-code#83756 (opens in a new tab).

A refill whose reason the provider recorded, but which still read part of the prompt from cache, is marked Provider-diagnosed refill. It is not a Possible full refill, because only part of the prompt was written again, and Pomegr counts it separately.

A Partial refill is the same situation without a recorded reason: most of the prompt was written again after the cache lifetime had gone unused, while part of it was still read from cache. This usually follows a request that took longer than five minutes to answer. The expiry is an inference, and Pomegr counts these separately too.

If a Possible full refill has no recorded reason and no inference, the tooltip says no cause was recorded and points to the Agents tab, where the popover links to anthropics/claude-code#82563 (opens in a new tab), the upstream issue where this behavior is tracked. Pomegr infers nothing in that case.

Drops without a recorded write

As of September 2026, Codex records lack reliable Cache write counts (upstream issue (opens in a new tab)), so Pomegr cannot mark a Possible full refill there. Instead, when reuse collapses between adjacent requests from the same agent and model, with no cache write recorded, it marks Possible refill and calls it an inference: "No positive cache-write evidence, so a refill and its cause cannot be confirmed." The Requests legend also says "Codex does not report cache writes." If the recorded model changed between the requests, the marker reads Cache reuse dropped across a model change and makes no refill, expiry, or cause claim.

Cache lifetime and elapsed time

A cache entry lasts a limited time after each write or read. Pomegr shows the lifetime recorded for an agent's requests as Cache lifetime in the Agents tab inspector and in the Signals tab (see Signals and estimates):

  • Claude Code: 5m, 1h, or mixed, read from the provider's recorded cache-creation breakdown. Anthropic documents a five-minute default, a one-hour option, and a refreshed lifetime after each reuse (prompt caching (opens in a new tab)).

  • Codex: ≥30m for recognized GPT-5.6 and GPT-6 family models. OpenAI documents 30 minutes after the latest write or reuse as a minimum, so an entry may last longer (prompt caching (opens in a new tab)). Pomegr shows it as a documented minimum, never as an expiry.

For a 5m or 1h lifetime, Pomegr compares the newest Last cache touch, the latest request that read or wrote cache, with the clock. On the Sessions page, a small timer after a session's Updated time turns amber in the last minute of a five-minute lifetime or the last five minutes of a one-hour lifetime, then turns faint once it has elapsed. It follows the primary agent only, and older sessions keep their recorded evidence. Hover or focus it for the times and state.

In the Agents tab, Last request is the time of an agent's newest request that carries valid usage data; a provider summary or lifecycle update does not change it. In the agent tree, that time gets the same dotted disclosure while the agent's last cache touch is nearing or past a 5m or 1h lifetime. Finished and stopped agents and historical sessions show the recorded time only.

Limits

  • A pattern, not a cause. A drop shows that recorded counts changed. It does not prove a cache expired, why reuse changed, or what the provider charged.

  • Elapsed is not dropped. A lifetime that has passed does not prove the provider discarded the entry, and a prefix may never have been written.

  • Missing evidence stays unavailable. Malformed counts, a compaction between requests, or requests from different agents prevent a marker. An unavailable lifetime shows no timer.