Blog

Claude Code Limits in 2026: 8 Rules to Avoid Burning Through Tokens

Markdown

Claude Code Pro and Max limits in 2026 and 8 rules for saving tokens: /compact, Plan Mode, a dense CLAUDE.md, skills, model selection, and 90% cache savings.

Read full article

Key points

Claude Code limits run out not because of the subscription, but because of methodology. In the author's described experience, if all of the day's tasks go into one chat, the context overflows by lunchtime and tokens burn twice as fast. If you start a new conversation for every task, use a dense CLAUDE.md, keep the plan in a separate file, and load Skills on demand, the $100 Max subscription is enough for a full workday of vibe coding. In this article, I discuss actual plans, 8 rules for saving tokens, and the paused June 15, 2026 automation announcement.

Ailoot reference documentation: ailoot.ai/docs/.

How do Claude Code limits work in 2026, and why do you hit them?

Key points

Pro for $20 gives you about 45 messages in a 5-hour window, Max 5x for $100 gives you five times as many, and Max 20x for $200 gives you twenty times as many. Limits are counted separately for the 5-hour window and weekly. Anthropic doubled the 5-hour quotas on May 6, 2026. With the same limits, one person works 8 hours while another hits the limit by lunchtime—the whole difference is methodology.

As of May 20, 2026, paid Claude Code plans work like this:

PlanPrice5-hour window (approx.)What's special
Pro$20 / month~45 messages or 44K tokensBasic, for trying it out
Max 5x$100 / month~225 messagesPriority access
Max 20x$200 / month~900 messagesEarly access to new models
Team Premium$100 / seat (annual)Max 5x per seatSSO, shared projects
Enterprisecontractcustom + complianceRBAC, data residency

Figures from Anthropic's official page. In addition to the 5-hour window, there's also a weekly limit, which starts cutting into the experience for power users around Friday.

What was the May 6 doubling?

At the Code with Claude SF conference on May 6, 2026, Anthropic announced a deal with SpaceX Colossus 1: 220,000 NVIDIA graphics cards, 300 MW of capacity, online within a month. Immediately:

  • 5-hour limits doubled for all paid plans.
  • The daily peak-hours throttle was removed, which had previously cut quotas during peak hours.
  • For the API: max input tokens/minute for Opus rose from 30K to 500K (+1500%), and max output rose from 8K to 80K.

Another temporary promotion is in effect from May 13 to July 13: +50% to weekly limits for Pro / Max / Team. After July 13, weekly quotas will return to their previous levels.

How much does a vibe coder actually use?

Anthropic gives reference figures in its official docs:

  • Developers spend $13 / day on average, $150-250 / month.
  • 90% of users stay within $30 / day.
  • Agent teams in Plan Mode burn about 7 times more tokens than a standard session.

Context window size depends on the model. According to Anthropic documentation, as of September 2026 Opus 4.7 and newer, Sonnet 5, and Fable models have a 1M-token window on any plan, including Pro, and auto-compaction (auto-compact) is triggered by default at around 967K. Opus 4.6 and Sonnet 4.6 without extended context have a 200K window, and compaction is triggered at the 200K boundary. You can set your own threshold with the /autocompact command, for example /autocompact 500k. When you stuff half a day's work into one chat, the context bloats, Claude loses the thread, starts rereading the same files, and tokens burn 1.5 to 2 times faster.

In the author's described experience, the $200 subscription is enough thanks to the 8 rules discussed below. Without them, even Max 20x will run out by lunchtime.

Rule 1. Why does “one task—one conversation” save the most tokens?

Key points

The very first rule for saving tokens: don't dump three tasks from the day into one chat. Every new topic gets a new window. When the context is packed with half a day's conversation, Claude rereads what it already knows and spends tokens retaining irrelevant information. One chat = one task gives both Claude and you a clear head.

The rule isn't about “open 5 chats in parallel,” but specifically about “not scraping out the previous chat to use for the next task.”

In the approach described, it works like this. With each message, Claude sees not only the new request but also the entire previous conversation. If you discussed a landing page in the morning, then moved on to an email campaign, and then asked it to fix a workshop instruction, the entire history is included in the context at the time of the third request. Tokens are spent on “remembering the landing page,” even though you've already forgotten about it.

Why does “clearing your head” work?

Close the chat as soon as the task is done. This isn't even about tokens—it's a way to free up attention.

If the task is really finished, don't keep the chat around “just in case I come back to it.” Open a new one. You can find the old one with claude --resume or /resume using any indicator (branch name, PR ID, tag).

What should you do if a task stretches over two days?

If the task really needs to continue, don't leave the chat “hanging.” Before closing it, ask Claude to write a prompt for a neighboring chat (see Rule 7). This compresses 50K tokens of history into a 500-token prompt—and tomorrow the new chat picks up the context without rewriting everything.

Rule 2: Keep CLAUDE.md to 200 lines, not 500

Key points

CLAUDE.md is loaded at the start of every session and stays in context until the end. If it has 500 lines, you pay for those 500 lines in tokens in every session. Anthropic officially recommends staying within 200.

CLAUDE.md is the first file Claude reads when starting a new session. This section is specifically about saving tokens.

How many lines is normal?

ApproachLinesWhere it works
Anthropic's official recommendationup to 200Average repository
Auto-generated with /initvariesMore often worsens results than improves them

Why does a long CLAUDE.md make the agent dumber?

The explanation is simple: /init describes the repository “back to the model,” adding to the context information the model already knows or can discover itself at a glance at the structure. This duplication consumes tokens and blurs the focus.

The density rule: every word changes behavior

If I can remove a line from CLAUDE.md and Claude's behavior won't change, that line is unnecessary. Use this as a test:

  1. Open CLAUDE.md and go through every paragraph.
  2. Ask yourself: “If I remove this, will Claude start making mistakes?”
  3. If not, delete it or move it to a Skill.

All rules that only apply in specific situations go into skills (.claude/skills/<name>/SKILL.md). CLAUDE.md is only for what is needed all the time.

Rule 3. Why keep the Claude Code plan in a separate file?

Key points

The plan is a read-only phase: Claude doesn't write code, it only investigates and proposes an approach. After approval, I choose the implementation permission mode explicitly. I keep my plan in a separate file in the plans/ folder and provide it to the chat as context for implementation. This saves the most expensive thing—rework when the initial direction was wrong.

Plan Mode is a Claude Code mode enabled with Shift+Tab. In it, Claude explores the codebase, reads files, and asks questions before implementation. For the workflow below, keep repository edits separate: review the proposed plan, then save it manually to the project’s plans/ folder, or explicitly leave Plan Mode and authorize that plan-file write before starting a new chat.

Why is a plan in a file stronger than a plan in Claude's head?

I have a plans/ folder in each project. When I start a task:

  1. I ask Claude in Plan Mode to investigate and suggest an approach.
  2. I review the plan and save its text myself to plans/YYYY-MM-DD-task-name.md; alternatively, I leave Plan Mode and authorize Claude to write that file. I verify the saved contents before closing the chat.
  3. I close the chat.
  4. In a new chat I say: “read plans/YYYY-MM-DD-...md and implement phase 1.”

What I gain:

  • The plan is fixed—Claude doesn't “forget” what we decided an hour ago.
  • I can edit the plan by hand—I see 5 steps, understand that step 3 is unnecessary, delete it, and move on.
  • The plan survives a restart—I come back tomorrow, open the file, and continue.
  • I can hand it to agents sequentially—one chat writes the plan, another implements it, a third reviews it.

Plan Mode doesn't break the cache

An important detail: Plan Mode invalidates only the conversation cache (messages), while the system prompt and project context (CLAUDE.md) stay warm. That means switching to Plan Mode and back costs almost nothing in tokens—unlike changing the model with /model, which breaks the cache for 90% of the input price and forces the entire prefix to be recalculated.

Context engineering also means keeping the plan somewhere it will last, not in a chat that will die in 5 hours.

Rule 4: Skills load on a trigger, not at the start of a session

Key points

Claude Code Skills are folders with a SKILL.md file that Claude sees only when they're relevant to the task. CLAUDE.md is always loaded; a skill is loaded only when its description matches your request. That's why a project can contain dozens of skills without burdening the context—the startup prompt includes only a small header with each skill's name and description.

Skills use three-level loading:

  1. Metadata always—at session start, Claude sees only the name and description of each skill. Budget: ~100 tokens per skill.
  2. Instructions on trigger—when the user says something relevant, Claude loads the body of SKILL.md. Budget: up to 5000 tokens.
  3. Resources on request—bundled files (examples, templates) are pulled in only when the model itself reaches for them.

Full instructions are loaded only when Claude decides a skill is relevant (less than 5k tokens). Auxiliary scripts and files are loaded only when explicitly needed. That means you can have dozens of skills installed without affecting performance on unrelated tasks.

— Anthropic Skills Documentation, https://code.claude.com/docs/en/skills

How does this change token economics?

In the example described, the canon for writing educational instructions, the mailing rules, and code review rules used to be in CLAUDE.md. The file grew to 500 lines, and at every session start I paid for all 500 lines, even if the conversation was about a landing page.

In this example, CLAUDE.md contains 200 lines of navigation and basic principles. The 4 sets of rules live in skills:

.claude/skills/
├── write-tutorial/SKILL.md         # trigger: “write a guide”
├── deploy-checklist/SKILL.md       # trigger: “check before publishing”
├── send-broadcast/SKILL.md         # trigger: “send a mailing”
└── debug-payment-webhook/SKILL.md  # trigger: “check the payment”

Claude sees only the headers at startup—400 tokens. When I say “write a guide,” it loads the corresponding SKILL.md and follows it. When I say “send a mailing,” it loads a different one.

A quote from the skill-writing rules in the official Anthropic docs:

Once a skill is loaded, its contents stay in context on subsequent turns, so every line is a recurring cost in tokens. Write what to do, not a recap of how and why.

— Anthropic Skills Documentation, https://code.claude.com/docs/en/skills

When a skill is suspect, don't install it

Skills are executable instructions with direct access to your files and API keys. Before installing someone else's collection, I open every SKILL.md and read it myself. If there are bash: blocks with links to external URLs inside, that's a warning sign; I don't install it.

Rule 5. When should you hand a task to a sub-agent instead of the main session?

Key points

A sub-agent is a separate Claude session with its own context window, system prompt, and set of tools. Only the final output returns to the parent—the whole “noise” of reading 50 files and parsing 10K lines of logs stays in the sub-agent's context. This saves up to 90% of tokens on task types where the main session would otherwise bloat from exploratory searches.

From the official docs:

Delegate verbose operations to subagents so their verbose output stays in their context and only the result returns to the main conversation.

— Claude Code Documentation, https://code.claude.com/docs/en/costs

What tasks can be delegated to sub-agents?

  • Searching a large codebase. A sub-agent reads 30 files and returns “the relevant function is at src/lib/payment/cloudpayments.ts:142.” I don't see the contents of 30 files in the main context.
  • Running tests and parsing logs. A sub-agent runs npm test, catches 200 lines of output, and returns “3 tests failed in X, Y, Z for this reason.”
  • Multi-file refactoring. One sub-agent per file—in parallel.
  • Checking links in a guide. A sub-agent visits 30 URLs via WebFetch and returns “5 links return 404.”

In May 2026, Anthropic officially announced Multi-Agent Orchestration as a first-class feature. Previously, sub-agents could only be launched in code via the SDK; now they can be launched directly in Claude Code via slash commands.

Where sub-agents break down

So I never leave sub-agents unchecked for half a day. The rule is: the more you delegate in parallel, the more often you should check the interim results. On large tasks, I enable Plan Mode separately for each sub-agent.

Rule 6. How do you choose a Claude model (Opus / Sonnet / Haiku) for a task?

Key points

Opus 4.7, Sonnet 4.6, and Haiku 4.5 differ in price by roughly 5-15 times. Opus costs ten times more than Haiku, but it isn't ten times smarter on 90% of tasks. So the rule is simple: use Opus only when you need a deep architectural decision or a complex refactor. Sonnet is the default for ordinary work. Haiku is for simple searches, classifications, and lookups.

API prices (per million tokens):

ModelInputOutputCached input
Opus 4.7$5$25$0.50
Sonnet 4.6$3$15$0.30
Haiku 4.5$1$5$0.10

Source: Anthropic's official page. Prices aren't visible on a subscription, but the ratio is the same. Opus 4.7 has a caveat: compared with Opus 4.6, its new tokenizer may use up to +35% more tokens for the same text. The price per token hasn't gone up, but the effective cost per request has. If you run everything through Opus without thinking, your limit will run out 5 times faster than if you used Sonnet or Haiku for half your tasks.

Example of choosing a model

TaskModelWhy
Architectural decision, new product sectionOpus 4.7Depth is needed
Write a component to a clear specificationSonnet 4.6Default
Fix a typo, rename a variableSonnet 4.6 or Haiku 4.5Simple edit
Find a file from a description, file routingHaiku 4.5Cheap
Text translation, classification, summarizationHaiku 4.5A simple model can handle it
Review your own codeSonnet 4.6Default
Complex bug hunt requiring multi-step reasoningOpus 4.7Chains of reasoning are needed

Switch models with the /model command. But changing models invalidates the cache. If you switch from Sonnet to Opus in the middle of a session, the next request recalculates the entire prefix from scratch at the full input price (not the cached price). So it's better to choose the model at the start, not keep switching back and forth.

/effort—a less aggressive setting

In April 2026, Anthropic rolled out /effort—5 levels of reasoning depth: minimal / low / medium / high / xhigh. Claude Code on Opus 4.7 runs at xhigh by default.

What I do:

  • For classification, data extraction, and short summaries: /effort low. This saves 30-70% on task types that don't need deep reasoning.
  • For simple coding tasks: /effort medium.
  • For complex architecture: I leave it at xhigh.

/effort doesn't change the model, only the depth of its reasoning. The cache stays intact.

Rule 7: Pass a prompt to a new chat instead of using /compact

Key points

/compact compresses the chat history into a summary—but breaks the conversation cache and spends tokens on the summarization itself. I have a stronger trick: I ask Claude to write a prompt for a neighboring chat with the task and context, copy the prompt into a new chat, and start with a warm prefix. This compresses 50K tokens of history into a 500-token prompt.

/compact is an official Claude Code command that replaces the history with a summary. If you run it right after the last message, while the cache is hot (subscription TTL is 1 hour), the summary is cached and read at 10% of the standard price. If you run it after an hour, the cache is cold and you pay full price.

/compact can be customized:

/compact Focus on code samples and API usage

Or you can specify the default summary focus in CLAUDE.md:

# Compact instructions
When you are using compact, please focus on test output and code changes

But I usually do it differently.

Passing a prompt to a neighboring chat: an example

Steps:

  1. In the current chat, when I see that the context has passed 50%, I say: “Write me a prompt for a neighboring chat that will continue the work without losing the meaning. Include: what we were working on, what has already been done, what remains, key files and constants.”
  2. Claude gives me a prompt of 300-800 tokens.
  3. I close the current chat with /clear or simply open a new one.
  4. I paste in the prompt and start with a warm CLAUDE.md and project context, but clean conversation memory.

What I gain compared with /compact:

  • Control over what goes into the new chat. /compact summarizes according to its own understanding; I can edit the prompt by hand before starting.
  • I can save the prompt to a plans/ file and return to it tomorrow.
  • The new chat starts with a clean conversation cache—after that, you work at the cached input price.

When is /compact better?

  • When you're in Plan Mode and don't want to lose the current plan.
  • When the task is uniform and the context is consistent (for example, translating a long document).
  • When /compact runs immediately after Claude's answer—then the summary lands in the hot cache and costs 10%.

/clear—the last resort

/clear erases everything, including project context. I use it only when switching to a completely unrelated topic and don't want to retain anything from before. After /clear, the next request pays the full price to load CLAUDE.md again.

Rule 8. What invalidates the Claude Code cache, and why do you pay for it?

Key points

Claude Code applies a 90% discount to input price through caching—cached tokens cost 10% of the regular input price. The cache lasts 1 hour on a subscription (5 minutes on the API by default). But any edit to the system prompt or project context breaks the cache and forces the entire prefix to be recalculated. This knowledge pays off for me every day: if I see that a short request suddenly used a huge number of tokens, it means I broke the cache somewhere along the way.

On a subscription, cache TTL is 1 hour (extended each time it's accessed). On the API, the default is 5 minutes. This means that if you return to work after 40 minutes, the cache is still alive and the next request costs pennies for input. After 1 hour, the cache expires and you pay the full price.

Most of the time spent on compaction goes to generating the summary, not to a cache miss.

— Claude Code Documentation, https://code.claude.com/docs/en/prompt-caching

What breaks the cache (avoid these in the middle of a task)

  1. /model—changing the model mid-session. Each model has its own cache. After /model opus, the next request recalculates the entire prefix for Opus from scratch.
  2. Enabling Plan Mode with the opusplan setting. In this mode, Plan Mode = Opus, normal mode = Sonnet. Each Shift+Tab = model change = invalid cache.
  3. MCP server connect / disconnect. Including auto-reconnect after a transient failure. If your MCP server is unstable, you pay twice.
  4. Bare-name deny rules (Bash, WebFetch)—they change tool definitions in the system prompt.
  5. /compact—invalidates the conversation layer (by design).
  6. Upgrading Claude Code to a new version—a new version means a new system prompt and a new cache.

What does NOT break the cache?

  • Editing files in the repository (they're read on demand).
  • Editing CLAUDE.md mid-session (but the changes don't apply until restart—see Rule 2).
  • Changing output style.
  • Changing permission mode (if opusplan isn't involved).
  • Skills / commands invocation (added to the conversation layer).
  • /recap (a new command, summary without cache invalidation).
  • /rewind (returning to an already warmed prefix).
  • Spawning a sub-agent (the parent's cache is unaffected).

How to use the cache to your advantage

  • Don't switch /model without a reason. Choose the model at the start of the task.
  • Don't enable 10 MCP servers “just in case.” Each adds to the system prompt and breaks the cache on reconnect.
  • Don't edit CLAUDE.md between tasks—make all edits at once and restart afterward.
  • Use /recap instead of /compact when you just need to look at a summary, not free up context.

What happened to the June 15 automation credit proposal?

The proposed split into interactive and programmatic subscription pools was paused. Anthropic’s support update says Agent SDK, claude -p, and third-party apps can still use subscription limits. Do not add the abandoned proposal’s credit amounts as a second mandatory bill.

Separate monthly API credits introduced for eligible Max and Team plans in October are an included allowance in a linked Console organization. They do not replace the plan’s interactive limits. The current API credits guide distinguishes subscription sign-in from API-key work and identifies launch surfaces that are not covered.

Before budgeting a scheduled task, record its authentication method, launch surface, model, and actual usage. A claude -p command alone does not establish which balance it consumes. Extra paid API usage depends on the organization’s billing configuration. For the current explanation and calculator, see Claude Code automation billing.

A day in the life of a vibe coder using Claude Code

Key points

If all 8 rules work together, the Max 5x subscription for $100 is enough for 8-10 hours of vibe coding a day. The limit won't run out because each chat handles one task, CLAUDE.md is dense, the plan is stored in a file, skills load on demand, heavy work is delegated to sub-agents, the model is chosen for the task, transitions between tasks use a prompt handoff, and you don't switch /model or MCP in the middle of a session.

An example day:

  1. 9:00. I open task #1—an edit to an email template. I open a new chat, use Plan Mode, and ask Claude to investigate. The plan is ready in 3 minutes; I switch to auto-accept, and the edit takes 10 minutes. I close the chat.
  2. 9:30. Task #2—write an educational guide. I open a new chat, where my guide-writing skill is triggered. It loads 4000 tokens of methodology. I work through it, and the guide is ready in 40 minutes. Done.
  3. 11:00. Task #3—a complex architecture issue. /model opus, Plan Mode, discussion. I review the plan, save it manually to plans/2026-05-20-...md (or authorize the file write after leaving Plan Mode), verify the file, and close the chat.
  4. 12:00. New chat: “read plans/2026-05-20-...md and implement phase 1.” 6 sub-agents work in parallel—one per file. Phase 1 is ready in 45 minutes. I close it.
  5. 14:00. Task #4—an edit to a landing page. /model sonnet. New chat. Plan + implementation takes 30 minutes. I close it.
  6. 15:00. Task #5—debug production. /model opus, Plan Mode; depth is needed. After an hour of discussion, I ask it to write a prompt for a neighboring chat with the identified cause and proposed fix. I copy it to a new chat and implement it in 20 minutes.

By the end of the day: 6 tasks, 8 closed chats, not a single /compact. The limit is used up by 40-60%. That's plenty.

The limit runs out for people who:

  • Stuff an entire task into one chat that already has 50% of its context used.
  • Keep CLAUDE.md at 600 lines because “it might come in handy.”
  • Switch to /model opus for every simple edit.
  • Enable 8 MCP servers just in case.
  • Never use sub-agents and drag everything into the main conversation.

The limit doesn't run out for people who build a second brain in project files and work with Claude like an engineer on the team—they give it clear tasks, don't dump everything into one conversation, and use different tools for different tasks.

You can continue exploring Ailoot at ailoot.ai.

More details

Questions about Claude Code Limits in 2026: 8 Rules to Avoid Burning Through Tokens

How can I save a plan if I am still in Plan Mode?

Review the proposed plan and copy it manually into the project’s plans/ file, or explicitly leave Plan Mode and authorize that file write. Check the saved contents before closing the session so the next chat can load the actual file.

What should go into a handoff before starting a fresh chat?

Include the task, completed work, remaining work, key files, and decisions. Save the approved plan or handoff first, then provide its path to the new chat; a short handoff is useful only if it preserves the information needed to continue.

All articles