Prompt caching can reuse eligible repeated input, but repeating a prompt is not proof of a cache hit or a lower final bill. For coding Agents, verify the usage record first, then compare the cost of an accepted task.
This guide proposes a small diagnostic experiment. It is based on documentation checked September 29, 2026; it does not report an Agent.Space cache benchmark or guarantee a savings percentage.
Choose a workload with a stable prefix
Repository instructions, unchanged tool definitions, and stable reference material are reasonable candidates to investigate. Rapidly changing files or a different routing destination can make a comparison harder to interpret.
Keep stable material before task-specific content where the protocol supports that layout. Do not pad a prompt just to reach a caching threshold: extra text can add cost and distract the model.
Caching also does not replace task scoping. The Codex quota reduction guide explains how to avoid unnecessary work before optimizing its input.
Run a small hit-and-miss experiment
Use non-sensitive fixture text and a model you are allowed to call. Agree on a small test budget before sending requests.
- Send a baseline request with stable instructions and one short task.
- Repeat with the same eligible prefix and a different short task, within the provider's documented cache conditions.
- Record request IDs and usage fields for both.
- Change one part of the prefix and observe a third request, if the budget allows.
- Keep model, endpoint, and routing choices fixed throughout.
This is a diagnostic design, not a claim that those three requests will produce a particular result. A cache hit must come from the provider's record; the response sounding similar proves nothing.
Read usage before calculating savings
Claude's prompt-caching documentation separates cache creation, cache reads, and uncached input. In that protocol, input_tokens alone is not the full input total.
Do not transplant those field meanings into another API. OpenAI's prompt-caching guide documents its own reporting and eligibility rules.
Use the API cost calculation guide to normalize the recorded categories before multiplying by current prices. Include the initial write and any retries. A cheap cache read does not erase the earlier setup cost.
A useful worksheet has request ID, model, cache-write tokens, cache-read tokens, other input, output, applicable prices, and final charge. Leave unsupported fields blank rather than inventing a zero.
If there is no hit, test one explanation at a time
Missing counters mean insufficient evidence, not automatically “caching is broken.” A provider may also bill through a different plan abstraction. Do not infer subscription allowance savings from API cache prices.
Optimize the accepted task
Prefer the workflow that completes the reviewed task at an acceptable total cost. A high cache-hit rate with repeated failed attempts may still be worse than one successful uncached request.
For Agent.Space integrations, start with the Developer API setup, then inspect the usage information actually available for your selected route. Open Agent.Space to configure a supported client; verify caching separately instead of assuming it from the connection.
