A person using Claude Code shared several prompt-caching actions that can make extended sessions use far more resources than anticipated.

Reddit user u/virtualunc stated that they uncovered these specifics by reading through the documentation for Claude Code rather than checking the changelog.

The primary concern relates to the duration that Claude Code preserves the cache for the main discussion.

Prompt Cache Drops From One Hour to Five Minutes

Subscription customers who remain inside their standard plan limits benefit from a one-hour prompt cache lifespan for the primary dialogue.


Yet, the moment a customer goes past that limit and begins drawing on extra usage credits, the cache duration shrinks to only five minutes.

This means the idle period before Claude must reprocess the dialogue shrinks by a factor of 12, despite the person operating inside the exact same session.

Customers using Claude Code via an API key or a cloud service receive the five-minute cache automatically.

Your Claude Code prompt cache drops from an hour to five minutes the second you pass your plan limit byu/virtualunc inClaudeAI

Subagents Already Use a Five-Minute Cache

The extended cache duration is restricted strictly to the primary dialogue.

Additional Claude Code operations, such as workflows, subagents, session-title generation, and compaction, rely on a five-minute cache regardless of the user subscription level.

Consequently, reopening a subagent after a 10-minute interval can force the context to reload entirely from the beginning, even for Max tier subscribers.

Users Can Extend the Cache

The information on Reddit notes that individuals can modify this performance by configuring promptCacheTtl to 1h or by applying the CLAUDE_CODE_PROMPT_CACHE_TTL environment variable.

The subagentPromptCacheTtl configuration manages the cache length for other queries, including subagents.

These adjustments demand Claude Code version v2.1.242 or a later release, and individuals relying on API keys can also take advantage of them.

Switching Models Rebuilds the Cache

A further critical factor concerns changing models mid-session.

Modifying models forces Claude Code to parse the complete chat history over again without benefiting from cache hits.

This situation becomes particularly apparent when using opusplan.

When Claude Code shifts between Opus for planning tasks and an alternate model for execution, every transition into or out of plan mode counts as a model change. Going back and forth between building and planning can therefore regenerate the cache continuously.

Agent Teams Can Use Around 7x More Tokens

Collaborative agent groups can likewise consume markedly higher amounts of usage compared to a standard Claude Code session.

Documentation points out that teams might use roughly seven times the number of tokens when members stay inside plan mode.

Every teammate preserves an individual context, which raises the overall processing volume needed.

/usage Can Show Your Cache Hit Rate

Individuals are able to review cache efficiency by executing the /usage command.

Beginning with Claude Code v2.1.251, the tool features a Prompt cache (main) entry displaying the cache hit percentage.

Starting with v2.1.260, Claude Code can additionally pinpoint the probable cause for the latest cache miss.

These discoveries clarify why extended Claude Code tasks might abruptly begin using higher amounts of resources even when the workload remains identical.