ByteCosts
plan-usage-limits-prompt-cache.mdx

AI Coding Agents

How prompt caching affects Claude Code plan usage

Claude Code re-reads conversation history at the cached token rate when the prefix is warm, and reprocesses the full context after the cache expires. Anthropic documents the plan windows and cache behavior but gives no weighting for cached tokens against Claude plan limits. Use the plan bars for remaining allowance and the cache statistics to diagnose repeated work.

Which usage window applies to your plan

As of November 30, 2026, the Claude help center lists a five-hour session limit and a weekly limit for Pro and Max. Ultra has a weekly limit, and verified Ultra accounts have no five-hour session limit. Max and Ultra also have a separate weekly Fable limit. Both Claude and Claude Code draw on the shared limits, so a coding session can start with some of its allowance already used by chat. For Teams and Enterprise, the Claude Code costs guide describes a per-seat allowance that resets on a rolling five-hour window and a weekly window. The seat allowance is shared across Claude Code, Claude chat, and Cowork, and depends on the seat tier. Claude plan help, Claude Code costs

What you’re checkingWhat the official documentation saysWhere to look
Claude Pro or Max allowanceA five-hour session limit and a weekly limit shared across Claude and Claude CodePlan usage bars and limit messages
Claude Ultra allowanceA weekly limit and a separate weekly Fable limit. Verified Ultra accounts have no five-hour session limit.Plan usage bars and limit messages
Claude Teams or Enterprise seat allowancePer-seat rolling five-hour and weekly windows shared across Claude Code, Claude chat, and CoworkSeat usage and account controls
Claude main conversation cacheCache lifetime, input share served from cache, and misses describe the current session’s prefix reusePrompt cache (main) in /usage
Codex allowanceLocal messages and cloud chats share the allowance. Weekly limits may apply, and Pro currently has no five-hour limit.Codex usage dashboard
Codex credit billingSeparate published rates for uncached input, cached input, and outputCodex credit rate card

Keep the cache lifetime and the usage window on two clocks. A cache can expire while there’s still room in your plan allowance. A warm cache can also coexist with a plan bar near its limit. Check the reset time shown by the product if you need to schedule a larger task. Claude Code’s costs guide says switching models won’t restore access after a seat-wide session or weekly limit, although a model-family-specific limit can allow work on another family. Claude Code costs, Codex pricing

When a limit appears earlier than you expected, start by confirming the billing mode in which the session is running. Anthropic’s help center says that setting ANTHROPIC_API_KEY makes Claude Code use the API key and incur API charges instead of drawing on included subscription usage. That distinction changes which meter answers the question. For example, when comparing a team member’s seat usage with a script’s token report, check that the script actually ran under the seat before treating them as evidence of the same spending. Claude plan help

Why warm history still draws usage

Claude Code sends the full conversation with each request. Tool use adds requests carrying tool results, so a single message in the interface can initiate multiple rounds. With prompt caching, Claude Code re-reads the reusable history at the cached token rate. The costs guide uses the example of a one-line question in an all-day session to explain why the whole conversation still draws usage. A brief question in a long transcript and the same question in a fresh session can therefore carry different amounts of history. Claude Code costs

No official source in the documented plan and cache material gives a numerical weight for cached tokens against Claude plan limits. The API price schedule describes billed token rates. It supplies no conversion from cached token share or estimated API cost to the percentage of a subscription window consumed. Use the plan bars for capacity and the token counts for comparing the work each session sends. A higher hit ratio can coexist with greater total input if the conversation has grown substantially. Claude plan help, Claude Code costs, Claude API prompt caching

The default one-hour time to live (TTL) applies to Claude Code’s main conversation when it’s running on a Claude subscription within included usage. Anthropic also assigns that TTL to a small set of server-controlled helper requests. Subagents and compaction default to five minutes. The main conversation also defaults to five minutes on usage credits, an API key, or a cloud provider. Claude Code documents separate overrides, so use the TTL shown for your actual session when interpreting a break. Claude Code prompt caching

On the first request after a break longer than the active TTL, Claude Code reprocesses the context. If the first thing you do is compact an old session, the summary request itself has to read the history. When you still need continuity, compacting while the prefix is warm can reuse cached history for the summary. When you’re starting unrelated work, /clear starts fresh without a summarization request. The cache TTL guide covers the lifetime trade-off in more detail. Claude Code prompt caching, Claude Code costs

Think about the next useful turn before deciding whether to reopen a long conversation. If you still need the sequence of failed attempts, preserving history may save a fresh investigation. If you only need the name of the failing test and the file already edited, carry those details into a new task. The plans don’t provide the weights needed to predict either choice as a percentage of allowance. You can still compare the requests you send and judge whether the old context adds enough information to justify reading it again.

Read the session and plan views together

On Claude Code v2.1.251 and later, run /usage after the main conversation’s first response and look for Prompt cache (main) in the Session block. It reports the number of requests, the share of input tokens served from cache, misses, and whether the cache is warm. When shown, an expected rebuild reflects a rewrite such as compaction or tool-result clearing. The line covers the main conversation. Use the plan breakdown to see recent usage attributed to subagents and other features. Claude Code costs

Read cache statistics in relation to the task. Suppose you resume a debugging session after a long break and see a miss with a large volume re-cached. The expired prefix gives you an explanation to test. If misses recur during active work, look for a model change or other prefix change. Claude Code gives each model its own cache, so even identical content needs to be recomputed after a switch. For a list of changes to compare against your timeline, see prompt cache invalidation causes. Claude Code prompt caching

The plan breakdown in /usage attributes recent usage to skills, subagents, plugins, and individual MCP servers. Look at recommendation rows for actionable patterns such as long context, cache misses, or a large CLAUDE.md. A row’s share describes the recent usage it applies to. Several rows can cover the same requests, so summing them would overstate the effect of applying those recommendations. The breakdown is approximate and based on local history. Use the plan bars for the account allowance, especially when you’ve been using Claude on another device or in the browser. Claude Code costs

The Session block also displays a cost estimate intended for API users. For a subscription, look at the plan usage bars on the same screen to answer how much included usage remains. When you’re diagnosing a large jump, note what was running in the background as well as what you typed. The costs guide lists session-scoped scheduled tasks as a possible source of usage during apparent inactivity because they can send the full context. The published recommendations help you identify where to investigate before changing the model or clearing a conversation you still need. Claude Code costs

Estimate Codex credits for the same task at two hit rates

The Codex pricing page publishes standard-speed credit rates per million input, cached input, and output tokens. Credit billing has no separate cache-write charge. OpenAI also says credit prices alone don’t determine included subscription usage. Use the rates for a billed-credit estimate and the dashboard for allowance and reset times. Codex pricing

ModelUncached input credits per millionCached input credits per millionOutput credits per million
GPT-6.2 Astra200101,000
GPT-6.2 Sol502.5250
GPT-6.1 Terra251.25125

Suppose a GPT-6.2 Sol coding task uses 200,000 total input tokens and 10,000 output tokens across its requests. These are assumptions for an estimate, with the task, model, and output held constant. At an assumed 20% input hit rate, 40,000 input tokens are cached and 160,000 are uncached. At an assumed 80% hit rate, those quantities reverse. Multiply the tokens in each category by its credits-per-million rate, sum the products, and divide by one million.

Assumed input hit rateEstimated uncached input creditsEstimated cached input creditsEstimated output creditsEstimated session credits
20%8.000.102.5010.60
80%2.000.402.504.90

The estimated difference is 5.70 credits. The output charge stays fixed in both rows. In a real session, compare absolute token totals and retry counts alongside hit rate. A run that reads more history or makes more attempts can still cost more with a higher hit rate. This example prices Codex credits only. The Claude plan documentation supplies no weighting to repeat the calculation for a Claude subscription window. For guidance on the denominator, see how to measure prompt cache hit rate.

Change one habit and check the next session

If the task still needs its earlier decisions and tool results, group related turns within the active TTL where your schedule allows. Keep the same model through that work unless you have a reason to pay for a new prefix. If the next assignment is unrelated, take the file paths or decisions you need into a focused prompt and use /clear. This saves carrying the old transcript through every request of the new assignment. Claude Code costs, Claude Code prompt caching

If the breakdown points to project instructions, keep CLAUDE.md for recurring requirements and move specialized workflows into on-demand skills. If exploration produces large logs, give a subagent a bounded question and ask for the relevant evidence and file paths. The subagent still uses its own requests and cache. Compare the extra work it does with the repeated history it keeps out of the main conversation. Start with a task where you can keep the verification steps the same across both approaches. Claude Code costs, Claude Code best practices

For comparisons across sessions, start with repeated tasks you already do, such as fixing a known test failure. Keep the verification step and success criteria the same. Note which requests belong to preparation, implementation, and any retry. A shorter first answer can still lead to more usage overall if the patch needs another investigation, and a neat parent transcript can hide work done by a subagent. Let the task outcome and the plan breakdown guide the next change.

Record the plan and billing mode, task class, cache status, and final result from your next few sessions. If you need to keep continuity with less history, try the structured compaction checkpoint. If you routinely have to explain why one run was heavier than another, use the SQLite cost telemetry guide to track requests and outcomes together.

Sources

Interactive report

  • The Twenty Dollar Plan: A $20 flat plan feels simple until you price the same month on a meter. In this modeled stress test, a 100-action user costs the vendor $5, a 1,000-action user costs $32, and the plan falls below its 70% margin target once heavy users pass about 3.7% of the base.

How this note was produced

Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.

How prompt caching affects Claude Code plan usage. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/plan-usage-limits-prompt-cache/

Sources