One of the first things people notice when they start using Claude Code is how fast it burns through tokens. Have you ever thought, "I only edited one file -- how am I already at the limit?"

This article explains why Claude Code uses so many tokens, covers 10 practical saving techniques, and breaks down what happens when you hit the limit and how extra costs work.

1. Why Claude Code Consumes So Many Tokens

Unlike regular chat, Claude Code is an agentic system. A single instruction from the user triggers multiple internal API calls to complete the task.

Why Claude Code Consumes So Many Tokens

User Instruction
"Fix this file"
→ 1 command
Repeated internal API calls
1. Send system prompt
2. Resend conversation history
3. File search & read
4. Thinking tokens
5. Execute code edits
6. Verify results
7. Decide on further fixes
8. Generate response
1 instruction →
Resends the whole conversation with each tool use
(the longer the conversation, the bigger each request)

Specific Reasons for High Token Usage

  • System prompt + conversation history included every turn: Each message resends the entire conversation history, so the longer the conversation, the faster token usage accelerates
  • File contents are loaded into context: When editing code, the target file's content is pulled into context. Larger files consume more tokens
  • Tool calls chain together: A single instruction can trigger file search, read, edit, and verify steps internally. According to Anthropic's documentation, Claude Code sends your full conversation with every request, and each time Claude uses tools it sends another request carrying that batch of tool results (Manage costs effectively)
  • Thinking tokens count as output: Claude Code's internal "thinking" process also consumes tokens

Processing for this model happens on Anthropic's servers, so upgrading your PC to a more powerful one does not change token consumption or how long the AI spends thinking. What your PC does change is the time taken by commands that run locally, and whether memory is sufficient (see PC specs needed for Claude Code and Codex).

For more on the differences between Claude's modes, see our article on the differences between Claude Chat, Cowork, and Code.

2. Usage Limits and Pricing by Plan

You use Claude Code either by signing in with a paid Claude plan (Pro, Max, Team or Enterprise) or with an API key from the Claude Console. According to Claude's pricing page, every plan's limit is counted in a session window that resets every five hours, and paid plans add a weekly limit on top. There is no fixed message count: how much you can do depends on the length of your conversations, the model you pick and the features you use (Claude pricing page, checked September 26, 2026).

Pricing and Usage Limits by Plan (Individual)

Pro
$20
/month ($200 billed annually)
5-hour window + weekly limit
Shared with chat
Max
$100
/month
5x Pro per 5-hour window
Weekly limit applies
Ultra
$200
/month
10x Pro per week
No 5-hour limit if verified
API key
Pay as you go
Pay for what you use
Opus 5.5: $4 / $20
Sonnet 5.5: $2 / $10
(input / output per MTok, Sept 2026)
When the allowance runs out
Wait (no extra charge) / move to a higher plan / usage credits (billed at API rates, only if you turn them on)
* The token size of the 5-hour window and the weekly limit is not published (Claude pricing page)
PlanPrice (US)Usage limitPast the limit
Pro$20 billed monthly / $200 billed annually ($17 a month)5-hour window + weekly limitWait / move to Max / usage credits
Max$100/month (monthly billing only)5x Pro per 5-hour window and per weekWait / move to Ultra / usage credits
Ultra$200/month (monthly billing only)10x Pro per week (no 5-hour limit for verified accounts)Wait / usage credits
TeamStandard seat $20, Premium seat $100 (per seat per month, billed annually)Per-seat allowance (Premium = 5x Standard)Members can continue if an admin has turned on usage credits
Enterprise (usage-based)$20 per seat per month (billed annually) + usage at API ratesNo per-seat allowanceStops at the spend limit your organization sets
API key (Claude Console)Pay for what you usePer-minute rate limits + monthly spend cap429 error: wait or raise the limit

Sources: Claude pricing page, Anthropic Help Center "What is the Pro plan?" and "What is the Max plan?", Claude Code docs "Manage costs effectively" (all checked September 26, 2026). Ultra is the plan renamed from Max 20x on October 31, 2026. According to "What is the Ultra plan?" (Anthropic Help Center), its weekly limit is 10x Pro's, and verified accounts have no 5-hour limit (checked October 31). Verification happens automatically based on your account and payment history; if no "Current session" bar appears on the usage page in Settings, your account is verified.

Note: Claude Code and chat draw from the same allowance

On Pro and Max, the limits are shared between Claude on the web, desktop and mobile and Claude Code (Anthropic Help Center, "Use Claude Code with your Pro or Max plan"). On Team and Enterprise, the seat allowance is also shared with chat and Cowork. Use it all up in Claude Code and chat stops too until the window resets.

The top-tier Fable is handled separately. In the pricing page's comparison table, Pro can use it only through usage credits, while Max and Ultra can use it for up to 50% of the weekly limit. In Claude Code, depending on your plan, Fable usage can bill to usage credits instead of your plan's allowance; when it does, the Fable row in /model shows "Requires usage credits" and Claude Code asks before billing (Model configuration).

For a detailed pricing comparison, see our article on Claude vs ChatGPT pricing comparison.

3. 10 Token-Saving Techniques

By applying the following techniques, you can significantly reduce your token consumption.

Before you start trimming, though, it pays to measure what is actually taking up the context. Read the breakdown with /context, check the real consumption with /usage, and get the per-skill cost with /skill-doctor. We cover this in detail in what is actually eating your Claude Code context.

10 Token-Saving Techniques

1
/clear
Reset context
2
/compact
Compress conversation
3
Name the scope
Point to files and functions to cut searching
4
Switch models
Lighter work to lower tiers
5
Short output
Say "code only"
6
Limit thinking
/effort low to cut thinking tokens
7
CLAUDE.md
Keep it concise (under 200 lines)
8
Sub-agents
Delegate heavy tasks
9
Specs first
Avoid rework, stay linear
10
File formats
Convert PDF to text
3 to Try First
/clear + naming the scope + a model tier that fits the task → less resending, searching, and per-token cost
All techniques can be combined. The more you stack, the greater the savings

Tip 1: Reset Context Frequently with /clear

When switching to a different task, run /clear to reset the conversation. Leftover conversation history means unnecessary tokens are resent with every message.

# After finishing work on authentication
/clear

# Start the next task
"Add a payment feature"

Tip 2: Compress Conversations with /compact

You can compress a long conversation mid-session. Add custom instructions to keep only what matters.

# Basic compression
/compact

# Compression with custom instructions
/compact Keep only the code changes and API specs

That said, you do not gain more the more often you press it. The cost of a compaction swings on whether the prompt cache is warm, and pressing it straight after a break is the most expensive case of all. Where to press it is covered in detail in when to press /compact.

Tip 3: Name Exactly What Claude Should Read

When a request is vague, Claude Code searches widely for files that might be relevant and reads them, and the context grows accordingly. Anthropic's documentation makes the same point: a vague request like "improve this codebase" triggers broad scanning, while a specific one like "add input validation to the login function in auth.ts" lets Claude work with minimal file reads (Manage costs effectively). If you already know which file matters, reference it with @ and Claude pulls it into the conversation without having to go looking for it (Common workflows). An @-referenced file comes in with its full contents, and an @-referenced directory shows a file listing rather than contents, so reference only the files you need.

❌ "Improve this codebase"
→ Claude searches widely and reads whatever looks relevant (more input tokens)

✅ "Add input validation to the login function in @src/auth.ts"
→ Work stays on the file that matters

Tip 4: Switch Models Based on the Task

You don't need a top-tier model for every task. As of September 26, 2026, Claude Code's default model is Opus 5.5 on Pro, Max, Team, Enterprise and the API alike (Model configuration). Per token, though, the mid-tier Sonnet costs about half as much as Opus, and the lightweight Haiku is cheaper still: as of October 12, 2026, Haiku 5.5 costs one-fortieth as much as Opus for prompts up to 100,000 tokens (see the table in section 5). Anthropic's documentation likewise says Sonnet handles most coding tasks well and costs less than Opus, recommends reserving Opus for complex architectural decisions and multi-step reasoning, and suggests specifying Haiku for simple subagent tasks (Manage costs effectively). On subscription plans, too, how much you can do depends on the model you pick. Even when the ratios shift with a new version, the rule of thumb stays the same: pick the tier that matches how hard the task is.

# Use Sonnet for everyday coding
/model sonnet

# Use Opus for design decisions or complex refactoring
/model opus

Tip 5: Request Shorter Output

Longer AI responses mean more output tokens. Instructions like "code only" or "answer in one line" cut down unnecessary output.

❌ "Fix this function"
→ AI generates a long explanation + code + notes (lots of output tokens)

✅ "Fix this function. No explanation, just the code"
→ Code only (significantly fewer output tokens)

Tip 6: Limit Thinking Tokens

Extended thinking is on by default in Claude Code, and thinking tokens are billed as output tokens. Depending on the model, the default budget can run to tens of thousands of tokens per request. For work that doesn't need deep reasoning, lowering the effort level with /effort (or in /model) cuts the cost. Opus 5.5 and the Fable models always think, so on those you adjust effort instead (Manage costs effectively). Opus 5.5 defaults to medium effort; most other models default to high (Model configuration).

# Lower effort for simple tasks
/effort low

Tip 7: Keep CLAUDE.md Concise

CLAUDE.md (your project's instruction file) is loaded into context when a session starts and is then carried in every request that follows. If it holds step-by-step instructions for specific workflows such as PR reviews or database migrations, you pay for those tokens even while doing unrelated work. The official recommendation is to move such instructions into skills, which load only when invoked (Manage costs effectively).

CLAUDE.md Best Practices

Only include project rules, commands, and key conventions. Move long explanations and documentation to separate files. Aim for under 200 lines.

Tip 8: Leverage Sub-Agents

Hand work that produces a lot of output, such as running tests, fetching documentation or processing log files, to a subagent. The verbose output stays in the subagent's context and only a summary comes back to your main conversation. The subagent's own requests still count toward your usage, though; to spend less on them, give the subagent a smaller model such as Haiku (Manage costs effectively).

Tip 9: Provide Specs Upfront to Avoid Rework

A back-and-forth like "build it, then fix it, then change it" wastes tokens. Providing clear specs from the start prevents rework and keeps token usage linear.

❌ Conversation pattern (exponential token growth):
"Build a login feature" → "Add validation"
→ "Actually, switch to email auth" → "Change the UI too"

✅ Specs-first pattern (linear token growth):
"Build a login feature with these specs:
- Email + password authentication
- Email validation (format check + duplicate check)
- Password requirements: 8+ characters, alphanumeric
- Login form UI: centered, card-style layout"

For more on writing effective prompts, see our article on prompt tips for AI app development.

Tip 10: Watch Your File Formats

On the Claude API, each PDF page costs the tokens for its extracted text (typically 1,500–3,000 tokens per page) plus the tokens for the page converted to an image (Claude API docs, "PDF support"). Claude Code reads short PDFs whole and reads PDFs longer than 10 pages in ranges of up to 20 pages at a time (Tools reference). Point it at the pages you need, or convert the file to plain text before handing it over.

4. What Happens When You Hit the Limit: the 5-Hour Window, the Weekly Limit and Usage Credits

First, the key point: subscription plans can incur extra charges, but never on their own. To keep working past the limit you have to turn on usage credits yourself and prepay a balance. If you haven't, Claude Code simply stops at the limit, you wait for the window to reset, and your bill does not change (Anthropic Help Center, "Manage usage credits for paid Claude plans").

Two layers of limits: the 5-hour window and the weekly limit

  • 5-hour window (session limit): an allowance that resets every five hours. Pro, Max and Team all have it
  • Weekly limit: a weekly cap that applies across all models. It resets at a fixed day and time assigned to your account, which does not move with when you start using Claude or when you subscribed. You can see the next reset in Settings > Usage on claude.ai (Help Center, "What is the Pro plan?" and "What is the Max plan?")
  • Model-specific limits: some limits apply only to Opus or only to Sonnet

Usage counts against the 5-hour window and the weekly limit at the same time. A single burst of heavy activity, such as fanning out many subagents at once, can exhaust the weekly limit before the 5-hour window resets. As you approach a limit you see a warning such as You've used 85% of your session limit · resets 3:45pm, and when you reach it Claude Code stops with a message like these (Claude Code docs, "Error reference"):

You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am
You've hit your Opus limit · resets 3:45pm

Your options when you hit the limit on Pro or Max

OptionExtra chargeWhat it means
WaitNoneThe allowance comes back at the time shown. From Claude Code v2.1.234, the open session waits for the reset and continues the interrupted task on its own (press Esc to cancel). If the reset is more than 24 hours away, as a weekly limit can be, it doesn't start the wait by itself; pick it from /rate-limit-options
Switch modelsNoneFor an Opus-only or Sonnet-only limit, switching to another family with /model keeps you working. The 5-hour window and the weekly limit are shared by all models, so switching doesn't help there
Usage creditsYes (API rates)Only if you turn them on. Further usage is billed at standard API rates, separately from your plan fee
UpgradeThe price differencePro → Max → Ultra. Upgrades take effect right away
Switch to an API keyYes (pay as you go)Pay for what you use through a Claude Console account, separate from your plan's allowance

Sources: Claude Code docs "Error reference" and "Wait for a usage limit to reset", Anthropic Help Center "Use Claude Code with your Pro or Max plan", and the FAQ on the Claude pricing page (checked September 26, 2026). For what to do about each message, see You've hit your session limit in Claude Code: What It Means and What to Do.

How usage credits work (Pro and Max)

  • Where to turn them on: the "Usage credits" section of Settings > Usage on claude.ai. In Claude Code, /usage-credits opens that page in your browser (only when you're signed in with a claude.ai subscription; it isn't available with an API key)
  • Payment: prepaid. You buy a balance with "Add funds", and can turn on auto-reload to top it up automatically when it runs low
  • Guardrail: you can set a monthly spend limit (or choose "Set to unlimited"). If you reach it while credits remain, Claude Code asks whether to raise or remove the limit
  • Rate: standard API rates (the table in section 5), shown as a separate charge from your subscription. The 5-hour window keeps resetting as usual
  • Confirmation: you're notified as you approach and reach your limit, and asked to confirm before continuing on credits
  • Turning them off: you can disable them at any time in Settings > Usage, after which you only use your plan's allowance

Two details are easy to miss. The first is the cache lifetime. Within your plan's allowance, the cache for Claude Code's main conversation lasts an hour, but it drops to five minutes while you're drawing on usage credits. Step away for more than five minutes and the next message re-reads the whole conversation, so credits go faster (Manage costs effectively). The second is expiry. In most places purchased credits don't expire, but in some jurisdictions such as Japan they expire six months after purchase starting September 10, 2026, with an email seven days before.

If you never want to pay extra

  • Don't turn on usage credits (if they're on, turn them off in Settings > Usage)
  • Don't leave the ANTHROPIC_API_KEY environment variable set. If it is, Claude Code authenticates with that API key instead of your subscription, and your usage is billed as API usage (Help Center, "Use Claude Code with your Pro or Max plan"). /status shows which account you're currently using
  • Sign in with your Pro or Max account only, without adding Claude Console (API) credentials (same article)

Team and Enterprise

  • Team and seat-based Enterprise: each member's usage draws from a per-seat allowance that resets on a five-hour window and a weekly window. The allowance is shared with chat and Cowork, and its size depends on the seat tier (Standard or Premium). Members can continue past it only if an admin turns on usage credits, with spend limits at the organization, group or member level (Manage costs effectively). Team plans prepay for credits; seat-based Enterprise plans are billed at the end of each month for actual usage (Help Center, "Manage usage credits for Team and seat-based Enterprise plans")
  • If a member without billing access runs /usage-credits, Claude Code asks for confirmation and then sends a request to the admins
  • Usage-based Enterprise (new and self-serve plans): there is no per-seat allowance; all usage is billed at API rates from the first token. Usage stops when an organization or member spend limit is reached (Help Center, "How am I billed for my Enterprise plan?")

API key (pay as you go)

  • There is no 5-hour window or weekly limit; you're billed for everything you use
  • Exceed a per-minute rate limit (requests, input tokens or output tokens per minute) and you get a 429 error, with a retry-after header telling you how long to wait
  • Each usage tier, which depends on your usage history, carries a monthly spend cap (Start $500, Build $1,000, Scale $200,000). Reach it and usage pauses until 00:00 UTC on the first day of the next month. You can also set your own lower limit (Claude API docs, "Rate limits")
  • For an organization, you can also put spend limits on Claude Console workspaces (Manage costs effectively)
  • Max and Team plans come with monthly credits you can use on the API ($100 on Max, $200 on Ultra). You claim them by linking a Console organization, and they also cover claude -p run with an API key, but not interactive Claude Code ("The Monthly API Credits on Claude's Max and Team Plans")

API Usage Warning

According to Anthropic's documentation, the average across enterprise deployments is about $13 per developer per active day and $150–250 per developer per month, with 90% of users staying below $30 per active day ("Manage costs effectively", checked September 25, 2026). Costs vary widely with the model, codebase size and how many instances you run in parallel, so be sure to set up usage monitoring.

How to check what's left and what you've spent

  • /usage: plan usage bars, this month's usage-credits spend, and a breakdown of what used your allowance (skills, subagents, MCP servers and so on). /cost and /stats are aliases. The breakdown is computed from session history on this machine, so usage on other devices or on claude.ai isn't included
  • Settings > Usage on claude.ai: progress on the 5-hour window and the weekly limit, and when each resets
  • Status line: add the rate_limits fields to keep your remaining allowance on screen
  • /status: which account you're currently using
  • With an API key: the Usage page in the Claude Console (platform.claude.com/usage)

Sources: Manage costs effectively, Error reference, Commands (all checked September 26, 2026).

5. How Pay-As-You-Go API Pricing Works

On the API, the per-token price is set by the model's tier (top, upper, middle, lightweight). Individual prices move when versions change, but the relationships — higher tiers cost more, output costs five times input, and reads from the cache cost far less than input — have held across generations so far. Prices as of October 12, 2026:

TierModel (Oct 2026)Input TokensOutput TokensCache reads
TopClaude Fable 5.1$10 / MTok$50 / MTok$0.25 (2.5% of input)
UpperClaude Opus 5.5$4 / MTok$20 / MTok$0.20 (5% of input)
MiddleClaude Sonnet 5.5$2 / MTok$10 / MTok$0.10 (5% of input)
LightweightClaude Haiku 5.5$0.10 / MTok$0.50 / MTok$0.01 (10% of input)

* MTok = 1 million tokens. Source: Claude Platform Docs, "Pricing" (checked October 12, 2026). The Haiku 5.5 prices apply to prompts up to 100,000 tokens; above that, they rise to $0.50 for input, $2.50 for output and $0.05 for cache reads. Sonnet 5.5 cache reads dropped from 10% to 5% of input on October 7, 2026. The previous Haiku 4.5 ($1 input, $5 output) is now a legacy model and remains available. For current prices and a model comparison, see our Opus, Sonnet and Haiku pricing comparison; for each vendor's current models, see the list of current models and knowledge cutoffs.

What Is Prompt Caching?

Anthropic offers a prompt caching feature: when the same context (system prompt and recent conversation) is reused, what is read from the cache costs 10% of the base input price (and even less on Opus 5.5 and Sonnet 5.5 at 5% and Fable 5.1 at 2.5%, as in the table above). In exchange, writing to the cache costs 1.25x input for a 5-minute lifetime and 2x for one hour.

How long the cache lasts depends on how you're billed. Within a subscription plan's allowance, Claude Code gives the main conversation a one-hour cache; on usage credits, an API key or a cloud provider the default is five minutes (Claude Code docs, "Prompt caching"). With the five-minute lifetime, pausing for more than five minutes lets the cache expire, and the next message writes the whole context to the cache again. Setting promptCacheTtl to 1h extends the main conversation to one hour (at a higher write price).

Making the Most of Caching

Run /compact before taking a break. This shrinks the context, so when the cache expires, the impact on your next message is minimized.

For how to use models such as DeepSeek, GLM and Kimi from Claude Code to lower costs, along with the caveats (caching, search billing and where your code is sent), see How to Use DeepSeek, GLM and Kimi with Claude Code.

6. Summary

Key Takeaways

  • Claude Code triggers multiple API calls per instruction, consuming far more tokens than regular chat
  • The three fundamentals of saving tokens are /clear, /compact, and naming exactly what to read
  • Claude Code's default model is Opus 5.5 (as of September 2026). For everyday coding, the mid-tier Sonnet is often enough at about half the per-token price of Opus
  • Subscription plans have two layers of limits: the 5-hour window and the weekly limit. Unless you turn on usage credits yourself, there are no extra charges; at the limit you wait for the allowance to come back
  • With usage credits on, usage past the allowance is billed separately at standard API rates. Set a monthly spend limit
  • With an API key it's pay as you go, with per-minute rate limits and a monthly spend cap. Make use of prompt caching and monitor your usage

FAQ

Is the Pro plan realistic for Claude Code?

It works for light tasks, but you will hit the limit frequently during serious development. The Pro allowance is shared with regular chat, and there is a weekly limit as well. If you keep hitting limits on Pro, Anthropic's Help Center suggests moving to Max ($100/month) or turning on usage credits ("Use Claude Code with your Pro or Max plan").

Is there a way to check my token usage?

Use the /usage command in Claude Code to see your current session's token usage and estimated cost (the older /cost is now an alias for /usage). On plans such as Pro and Max, the same screen also shows your plan usage. For API users, detailed usage is on the Usage page of the Claude Console (platform.claude.com/usage). If you run several sessions in parallel and want to compare which one used the most, see Claude Code Usage by Session: How to Measure It.

How much will I pay if I turn on usage credits?

Only usage beyond your plan's allowance is billed, at standard API rates (the table in section 5). Usage within the allowance stays covered by your subscription. Charges come out of the balance you prepaid and stop at the monthly spend limit you set (with auto-reload on, the balance is topped up automatically when it runs low). If you're worried, set a low monthly spend limit in Settings > Usage (Help Center, "Manage usage credits for paid Claude plans").

If I hit the limit, will upgrading my plan take effect immediately?

Yes. According to the FAQ on the pricing page, upgrades take effect right away, and unused time on your current plan is credited toward the new one. Max is billed monthly only (Help Center, "What is the Max plan?"). If Claude Code is waiting for a reset, signing back in after /upgrade makes it check whether usage is available and continue right away (Wait for a usage limit to reset).

How does pricing work for teams and enterprises?

The Team plan (2 to 150 seats) has standard seats at $20/seat/month billed annually or $25 billed monthly, and premium seats, with 5x the usage of a standard seat, at $100 billed annually or $125 billed monthly; Claude Code is included with both seat types. To let members keep working past their seat allowance, an admin turns on usage credits. The Enterprise plan charges a $20/seat/month seat fee (billed annually) plus usage at API rates (source: Claude pricing page, checked September 26, 2026). For large-scale deployments, we recommend contacting Anthropic directly for a custom quote.

Sources

Primary sources checked (retrieved September 26, 2026): Claude Code docs Manage costs effectively / Error reference / Interactive mode / Prompt caching / Model configuration / Commands / Tools reference; Claude API docs Pricing / Rate limits / PDF support; the Claude pricing page; Anthropic Help Center usage credits (Pro and Max) / usage credits (Team and Enterprise) / Claude Code with Pro or Max / Pro plan / Max plan / Enterprise billing. Prices, limits and availability can change, so check the official pages before you subscribe.