Claude Code now spots when a gateway or custom base URL is silently killing your prompt caching.
What's wrong with this entry?
For providers reached through a gateway or a custom base URL, three consecutive turns of 20,000-plus input tokens with no cache read and no meaningful cache creation now report a cache_coverage_loss outcome, the signal that something between Claude Code and the model is dropping the cache markers.
- Reported under the new
api_prompt_cache_coverageevent, which did not exist in 2.1.245. - Fires once per conversation; the first turn that does show cache activity sends a one-shot confirmation instead.
- Not behind any flag, but limited to non-first-party or custom-endpoint setups.
api_prompt_cache_coverage
Strings lifted out of the shipped bundle, so the claim above can be checked against them.