ProductsAgent tooling
Agent Cache Meter
Know before your prompt cache goes cold.
A prompt-cache meter for omp and Claude Code. It shows how many tokens each request read from the cache, wrote to it and sent uncached, and counts down to the cache's expiry. When the cache goes cold it says what rebuilding it costs and whether /compact pays for itself.
Also for Claude Code, and a Tern plugin that shows every agent's cache in one place.

Coming back costs one rebuild.
Every request sends the whole conversation again. The prompt cache makes that cheap: tokens read from it cost a tenth of normal input. But the cache lives only an hour after the last request (five minutes on an API key).
After it expires, the first request writes the whole conversation to the cache again, at the cache-write price. In a real 487k-token Opus 5.5 session that was $3.63, the price of 30 normal requests. The meter counts down to that moment, warns before it, and shows what the rebuild will cost.

A big context costs on every request.
Even with a warm cache, each request reads all 487k tokens, $0.12 apiece, and one message with tool calls is often 10–30 requests. After /compact the same requests cost $0.04.
On a cold cache the meter compares both paths and recommends /compact when it pays: in Claude Code straight away, because its summary request is billed as plain input; in omp after about two requests, because omp writes the summarised history to the cache once more.
The meter
One line above the composer.
It redraws every second and takes one line, two when the cache is cold. What happened is on the left; the hit bar, hit rate and time (or the sizes) sit at the right end.
More than the warning time left, or omp will refresh the cache in time. Shows read · write · uncached of the last request.
Inside the warning time (default 60 s) with no refresh planned. The rebuild cost on the left, the countdown in amber.
The cache entry has expired. The rebuild cost, and on a second line what to do: continue or /compact.
A compaction is newer than the last request. Per turn is what every later request saves; now is the compaction's one-off result.
The screenshots render the extension's own code in omp and Tern with a fixed Opus 4.5 session: a 96.6k-token prompt whose first 37k tokens, the tools and system prompt, stay cached.
The breakdown, one command away.
/cache toggles a panel with session totals and the last eight requests, including warming refreshes and misses. Its title bar shows the next auto-refresh and its cost.
While the cache is expiring or cold it starts with what the meter leaves out: why omp didn't warm it, and on a cold cache what continue, /compact and /new each cost. The meter recommends /compact when it pays back within 10 turns, and continue otherwise.

Claude Code
The same meter, as the status line.
The same code omp's extension runs, under Claude Code's prompt. On a Claude subscription it adds list price: its dollar amounts compare options at API prices, they aren't a bill.

claude-cache-meter panel, run in a project directory, shows that directory's newest session: totals, the last eight requests with their split, and on a cold or compacted cache the breakdown behind the meter. Claude Code has no command that shows output without spending a turn, so the panel lives in the terminal.
Every agent's cache in one place.
- Status-line segment for the focused agent; clicking it opens the canvas.
- Tab titles with a countdown suffix.
- A toast per agent when its cache is about to expire with no refresh planned.
- A canvas listing every agent with its split, hit %, prefix, expiry, warming and advice. Focus switches to an agent; Compact sends it
/compact.
All colours come from the active omp or Tern theme, so light and dark themes both work.
status line · focused agent⛁ 4:12 · 97.6% hittab title · horizontal tabsmy-app ⛁ 4:12toast · default 60 s aheadone per agent, before its cache expirescommand paletteCache: open every agent, its split, hit %, prefix, expiry, warming and advice Cache: settings shared by every window
Four settings, all optional.
omp keeps them in ~/.omp/agent/cache-meter.json, and /cache settings edits them in place; Claude Code reads ~/.claude/cache-meter.json. A missing or invalid field falls back to its default.
setting defaultmeter.show alwaysalways, near-expiry or offmeter.warnLeadSeconds 60when a cache counts as expiringadvice.paybackTurns 10omp: recommend /compact when it pays back within this many turnstern.publish autowrite Tern's state file; off never
Install
One meter, three hosts.
The omp extension and the Claude Code status line each work on their own in any terminal. The Tern plugin needs one of them.
omp extension
omp install @horizonloop/omp-cache-meterDraws the meter above the composer and adds /cache and /cache settings. Sessions that are already running pick it up after a restart.
Claude Code status line
npx @horizonloop/claude-cache-meter installNeeds Node.js 18 or later and Claude Code 2.1.251 or later. Sets statusLine in ~/.claude/settings.json and keeps the old file as settings.json.bak; if you already have a status line it stops and changes nothing.
Or as a Claude Code plugin:
/plugin install cache-meter --marketplace horizon-loop/agent-cache-meter
/cache-meter:setupTern plugin, optional
tern plugin install github.com/horizon-loop/agent-cache-meter/tern-pluginReads the state files the omp extension and the Claude Code status line write in a Tern pane. The segment needs Tern's status bar (Settings → Appearance); the tab countdown needs horizontal tabs.
Tested on omp 18.12.6, Claude Code 2.1.311 and Tern 0.9.13.
Open source · MIT
Building something for agents?
Agent Cache Meter is a HorizonLoop project.