OpenCode Cache Hit Rate with Claude Models
In the week of 2026-09-29, OpenCode on Claude models had a median continuation cache hit rate of 96.5% (7 users), and 90.3% over all requests. Most misses came from: account switching (37%), new content in running turns (31%), cache expiry (19%).
Week of 2026-09-29 – 2026-10-05 (UTC)
Key takeaways
- What is normal: 96.5%, median of 7 users in running conversations; middle half 94.4%–97.5%
- All requests: 90.3%, including routing, expiry and new chats
- Largest cause of misses: account switching, 37% of misses
What cache hit rate is normal for each client
Week of 2026-09-29 – 2026-10-05 (UTC)
- Continuation hit rate (median user): 96.5%
- Middle half of users: 94.4%–97.5%
- Qualifying users: 7 (at least 20 continuation turns in the week)
- Hit rate over all requests: 90.3%
Why is my OpenCode cache hit rate low? Misses by cause
9.7% of this week's input was not read from cache. Here it is by cause, with what you can do about each.
- Routed to another upstream account or endpoint: 37% of misses, about 3.5% of all input
- A prompt cache lives with the upstream account that served the request. When a relay or multi-account gateway sends the next turn to another account, the whole context is written again. Direct connections to the vendor never show this cause.
- New content and prefix changes in a running conversation: 31% of misses, about 3.0% of all input
- Content that is new in a turn can only be written, not read, which is unavoidable; a changed system prompt, tool list or rewritten history also invalidates the prefix.
- More than 5 minutes idle, cache expired: 19% of misses, about 1.8% of all input
- More than 5 minutes passed between requests, so the previous cache entry may have expired.
- New conversation, or idle for over an hour: 13% of misses, about 1.3% of all input
- The first request of a new conversation, or one after an hour of idling, has to write the cache again.
- Parallel request (previous one still running): 1% of misses, about 0.1% of all input
- A request sent before the previous one finished (subagents, parallel tool calls) cannot read the cache the previous one is still writing.
- Switched model: 0% of misses, about 0.0% of all input
- Each model has its own cache, so the first request after a model switch reads the whole history again.
A few points of hit rate, several times the bill
At Claude Opus 5.5 official prices, with misses written to the 5-minute cache, the effective cost per million input tokens:
- This week's median, 96.5%: $0.37 (×1.0)
- 90%: $0.68 (×1.9)
- 80%: $1.16 (×3.2)
- 50%: $2.60 (×7.1)
How to check your OpenCode cache hit rate
- Anthropic format: cache_read_input_tokens ÷ (input_tokens + cache_read_input_tokens + cache_creation_input_tokens).
- OpenAI format: cached_tokens (in prompt_tokens_details or input_tokens_details) ÷ prompt_tokens / input_tokens.
- On Wokey, every request in the console's request log shows its cache reads and cache writes.
Why hit rates drop behind relays
- Account switching: the cache belongs to the upstream account, so a turn sent to another account rewrites everything. The most common relay cause; direct connections never have it.
- Format conversion: translating between Anthropic and OpenAI formats can change the prefix or drop cache_control breakpoints.
- Claude Code before v2.1.181, on a custom base URL, put a per-request token in the attribution block at the top of the system prompt, which defeats gateways that cache on the request body; upgrade, or set CLAUDE_CODE_ATTRIBUTION_HEADER=0.
- Self-test: send two requests with the same prefix above the minimum cache length; the second one's cache reads should be close to the prefix length.
Wokey routes a conversation's later requests to the same upstream account whenever it can. From 2026-10-04 to 2026-10-10, ordinary Wokey users hit 92.8% on Claude Opus 5.5 over all requests, against 87.8% for OpenRouter overall.
Compare with OpenRouter cache hit rates · Live: Wokey public cache hit-rate API (last 7 days)
How we measure
- Real user requests through the Wokey gateway; every Monday at 05:00 UTC we compute the previous Monday-to-Sunday week.
- Clients are identified from the request User-Agent. Requests from SDKs, HTTP libraries and downstream relays, whose real client is unknown, are left out, as are enterprise accounts.
- A continuation turn has the same model and upstream account as the previous request of its conversation and starts within 5 minutes of it finishing. Each user's rate is cache reads ÷ input over those turns (input includes cache reads and writes); we report the median over users with at least 20 such turns in the week.
- A cell is published with at least 5 qualifying users; a change of more than 3 points from last week is checked by hand first.
- Known biases: Wokey users only; usage habits vary widely; the all-requests rate includes the gateway's own routing loss (the "routed to another upstream account" cause).
FAQ
What is a normal OpenCode cache hit rate?
This week the median of 7 users was 96.5% in running conversations, with the middle half between 94.4% and 97.5%; over all requests it was 90.3%.
Why is my OpenCode cache hit rate low?
This week most misses came from: account switching (37%), new content in running turns (31%), cache expiry (19%). The page lists what to do for each cause.
Does a low cache hit rate burn my Claude plan limit faster?
Yes. In our measurements of Claude plan limits, cache reads use almost none of the limit, while cache writes count about like uncached input. A cached context costs next to nothing; a missed one counts in full again. Per-plan limits are on the Claude usage limits page (/claude-usage-limits).