Anthropic’s Claude Code is facing scrutiny over reported prompt-caching behavior that could increase usage costs for people working on long coding sessions. The issue has drawn attention after a user highlighted differences in how long the tool retains cached conversation data.
The findings were shared by Reddit user u/virtualunc, who reportedly discovered the details while reviewing Claude Code’s documentation rather than its changelog. The discussion focuses on how changes to cache duration may affect users who exceed their included subscription allowance.
Prompt caching is an important feature in AI-powered coding tools. It allows systems to reuse previously processed input, reducing the need to process the same information repeatedly and potentially lowering costs and response times.
Claude Code Prompt Cache Duration Explained
According to the reported findings, Claude Code maintains the main conversation’s prompt cache for up to one hour when subscription users remain within their included usage allowance.
However, after users exceed that allowance and begin consuming additional usage credits, the cache duration reportedly falls to five minutes. This shorter period could affect people who pause between requests during extended coding sessions.
The difference is significant. A five-minute cache duration is 12 times shorter than a one-hour duration, meaning the cached conversation may expire much sooner during periods of inactivity.
When the cache expires, Claude Code may need to process previously supplied conversation context again. For long sessions involving large codebases, extensive instructions, or repeated exchanges, that additional processing could increase token consumption.
The actual impact depends on the length of the conversation, the amount of cached information, the timing of subsequent requests, and the applicable usage and pricing rules.
Why Prompt Caching Matters for AI Coding
Prompt caching helps AI systems avoid repeatedly processing identical portions of an input. This is particularly useful for coding assistants, which often need to retain project instructions, code files, tool definitions, and previous conversation context.
Without an active cache, a subsequent request may require the system to process the same input again. Depending on the provider’s pricing structure, cache reads and new input processing can have different costs.
For developers working on complex projects, these differences can add up over time. Long conversations often contain substantial context, making cache behavior an important factor in overall efficiency.
A shorter cache duration does not automatically mean every request will cost more. The additional cost depends on whether the cache expires before the next request, how much context must be processed again, and whether cached input would otherwise have been billed at a lower rate.
Subscription Users and API Access May Differ
The reported behavior also highlights a distinction between Claude Code subscription usage and access through an API key or cloud provider.
According to the findings, API-key and cloud-provider users receive a five-minute cache duration by default. Subscription users, meanwhile, reportedly receive a longer one-hour duration while they remain within their included usage allowance.
These differences may be important for developers choosing between subscription plans and usage-based access. The most suitable option depends on how frequently they use Claude Code, how long their sessions last, and the size of the context involved.
Users should review the current documentation and applicable pricing terms before estimating the financial impact. Cache policies and product configurations can change, and the reported behavior should not be interpreted as proof that every user will face higher charges.
What Claude Code Users Should Know
Developers concerned about unexpected usage should monitor their consumption, understand when included limits apply, and review the pricing rules associated with additional usage.
Breaking large tasks into manageable sessions may help some users control context size, although this approach can also require repeating project instructions or information. Starting a new conversation is not always more efficient, so users should weigh the benefits against the amount of context they need to preserve.
It is also worth distinguishing between a cache expiring and a provider deliberately charging more for the same service. Cache expiration can lead to additional input processing, but the reported documentation alone does not establish that Anthropic introduced the behavior specifically to increase revenue.
The issue highlights a broader challenge for AI coding tools: users need clear explanations of caching, usage limits, and billing to understand the real cost of extended sessions.
As AI assistants become more deeply integrated into software development, transparency around these technical details will remain important for individual programmers, teams, and businesses that rely on them for daily work.
