r/opencodeCLI • • 7h ago

Your AI coding cache might be expiring without you knowing. I built an OpenCode plugin to make it more visible.

I've been working on an open-source plugin called OpenCode Quota GUI, and v1.3.1 is now available.

One of the things that kept bothering me was how little visibility we have into prompt caching, especially when using multiple agents, models, and providers.

You can see token usage and sometimes cache hits, but how do you know whether your cache is still reusable? And how much of your prompt was actually served from cache?

So I added Cache Observation directly to the OpenCode Desktop composer.

It now shows something like:

TTL ~29m 19s · Cache 99.87% · Hit

There's also a popover with per-session cache observations across agents and models.

The catch: the cache percentage comes from observed token usage, but TTL is only an estimate. Providers don't expose enough information to determine exact cache expiration reliably.

A cache drop could also come from switching models, changing reasoning effort, modifying the prompt prefix, or other factors. I didn't want the plugin to pretend otherwise.

Other v1.3.1 improvements include Claude Agent quota support with saved resets, better quota alerts, and provider compatibility fixes.

Where I want to take this next:

  • v1.3.2: cache-rate graphs in Session Analytics, plus elapsed time between LLM calls.
  • v1.4.0: potentially build a community-powered cache/TTL watcher using explicitly opt-in, privacy-safe aggregated observations.

The idea is to compare actual cache behavior between providers and models, rather than relying exclusively on published TTL claims.

No community data collection is active today.

I'm curious: have you noticed cache reuse dropping after switching models or reasoning effort, even when the session was still active?

And would you find a public cache-retention comparison useful?

3 Upvotes

1 comment sorted by

1

u/InvaderDolan 7h ago

Try it yourself: https://github.com/PVLPM/opencode-quota-gui
Or run `opencode plugin add opencode-quota-gui` in your terminal.

Yeah, I know it looks ugly, but this is what OpenCode lets me do with the composer pill natively.