Post
Claude Code Code Mode: What Is Documented and What Isn't
Claude Code Code Mode arrived in v2.1.323. Here is what Anthropic documents about it, the 5-hour limit, and how to measure any difference yourself.
Quick answer
Claude Code Code Mode is an experimental, opt-in feature added in v2.1.323 on 2026-11-12 (checked 2026-11-13). Instead of asking for one tool call at a time, Claude writes a short piece of JavaScript that makes several tool calls in one step. Anthropic’s Code Mode page does not say it saves tokens, and it does not say it stretches your 5-hour window. If you’ve read that it does, that claim isn’t on the primary page we read.
So do the latest updates make the 5-hour limit last longer? It depends on your plan. Only the Ultra plan is documented as having no 5-hour limit, and only for verified accounts. The Fable 5.2 launch offers are real but temporary: the Pro and standard Team seat offer ends 2026-11-16 at 11:59 pm PT, and Max and Ultra resets expire 2027-03-08. Several Claude Code releases made sessions waste less. We found no Anthropic page saying the Pro or Max allowance itself got bigger between September and November 2026 (checked 2026-11-13). The rest of this post shows where each fact comes from, then gives you a template to measure your own sessions.

What Code Mode is and how to turn it on
Normally Claude Code asks for a tool such as Bash, Read or Edit, reads the result, then decides the next step. Code Mode changes that loop. Anthropic’s Code Mode page describes Claude writing JavaScript that makes the tool calls, and Claude Code running that code in your session. One piece of code can run commands in parallel, pass one result into the next call and return only the part of the output Claude needs to read (checked 2026-11-13).
You still see the tool calls, such as an edit’s diff, but not the code. Press Ctrl+O to open the transcript viewer, where each piece of code shows up as a collapsed Code row. The changelog entry for v2.1.323, dated November 12, 2026, calls it “an experimental opt-in” (checked 2026-11-13).
The page lists three kinds of task to try it on:
- A change that repeats across many files.
- A search whose results need filtering before Claude reads them.
- Several independent commands that can run at the same time.
Turn it on
The page says Code Mode is off by default and “may change or be removed in any release” (checked 2026-11-13). To try it, set the CLAUDE_CODE_EXPERIMENTAL_CODE_MODE environment variable to 1. This is the shell form from the docs (not run here):
# Not run here: copied in shape from the Code Mode docs page, checked 2026-11-13
claude --version # needs v2.1.323 or later
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude
To turn it on for every new session, the same page shows an env block in your user settings file (not run here):
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_CODE_MODE": "1"
}
}
Claude Code asks you to confirm before your first Code Mode session, then restarts and shows a line near the top saying Code Mode is on. The page notes that Claude Code ignores this variable in a project’s settings files, so a repository you clone cannot switch it on for you. To turn it off, remove the variable or set it to 0. Organizations can block it by setting 0 in managed settings.
One catch: a Code Mode session can be resumed only with Code Mode on. If you run claude --continue with the variable removed, Claude Code refuses to resume that session.
Code Mode requirements and limits
According to the Code Mode page (checked 2026-11-13), you need:
- Claude Code v2.1.323 or later, on either release channel.
- A Claude subscription or Console account. Gateways, Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform and Microsoft Foundry are not supported.
- An organization that doesn’t use the HIPAA configuration or zero data retention.
- One of these models: Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2.
- An interactive
claudesession in a terminal. It doesn’t work with-p, the Agent SDK, the VS Code panel, the Desktop app or cloud sessions. - The native build of Claude Code, plus Git for Windows if you’re on Windows.
Some settings stop it from starting: an API key helper, agent teams, OpenTelemetry export, or DISABLE_TELEMETRY.
The page also lists limitations you should accept before turning it on:
- You can resume a Code Mode session only in the terminal, with Code Mode on.
- In auto mode, the classifier reviews the code, not each individual tool call. Your
denyandaskrules andPreToolUsehooks still apply to every call the code makes. - Code that you wait on in the foreground stops after ten minutes. Background code can run longer, up to two hours, and needs auto or bypassPermissions mode.
- Remote Control, Claude in Chrome and computer use aren’t available.
- You can’t move the session to the Desktop app or turn it into a background session.
Does Code Mode stretch the 5-hour limit?
The plain answer: the primary sources we read don’t say so (checked 2026-11-13). The Code Mode page explains how the feature works, who can use it and what its limits are. It doesn’t contain a claim about tokens saved, requests saved or a longer 5-hour window. The changelog entry is one line about adding the opt-in.
You can build a reasonable guess about why it might help. Fewer separate model turns could mean the conversation history gets re-sent fewer times, and filtering output inside code could mean Claude reads less text. Those are plausible ideas, not documented results, and the same mechanism could cut the other way, for example if the code Claude writes is long or gets retried. Nothing we read says which effect wins on your project.
You may come away with the impression that the window lasts longer with Code Mode on. That’s a reader’s impression, and an impression isn’t a measurement. Prompts differ, caches are warm or cold, and models use limits at different speeds. The last section gives you a way to test it properly.
What Anthropic documents about limit changes
If your real question is “did my allowance change this autumn?”, three things are documented. Each has a source, and each has a catch.
Ultra has no 5-hour limit for verified accounts
Anthropic’s Ultra plan help article says the Max 20x plan is now called Ultra, with no price change. Its key benefits include “No five-hour limit for verified accounts” and 10 times the Pro plan’s usage every week (checked 2026-11-13). Unverified accounts get a temporary limit, and the article says verification is automatic. It also says weekly limits still apply, including a separate weekly Fable limit, and that additional limits may apply.
The pricing page agrees. Its comparison table lists a 5-hour limit of 1x for Pro and 5x for Max, and “No 5-hour limit” for Ultra, with a footnote that this is for verified accounts (checked 2026-11-13). So this change is real, but it’s about the Ultra plan. It isn’t a change to Pro or Max 5x. Anthropic says plans are subject to change at its discretion.
Neither Anthropic page we read gives an announcement date for the Ultra change, so we don’t state one.
The Fable 5.2 launch offers are temporary
The Fable 5.2 launch offers article says Fable 5.2 launched on November 9, 2026 (checked 2026-11-13). The offers split by plan:
- Pro and standard Team seats: Fable models are included in your weekly limits, up to 50% of them, through 2026-11-16 at 11:59 pm PT, plus one Fable limit reset that also expires then. After that, Fable runs on usage credits if you have them on.
- Max, Ultra and premium Team seats: one to three Fable limit resets depending on how long you’ve subscribed. These expire on 2027-03-08 at 11:59 pm PT.
A billing cutoff applies, so read the article for your plan. Two details matter here. First, a Fable reset refills the whole 5-hour window if your account has one, but the article states “A reset doesn’t raise your limits.” It restores usage. It doesn’t enlarge the allowance. Second, the same article warns that Fable models “use your usage limits faster than other Claude models.” So a window can empty faster on Fable, even during a promotion.
The limit reset help article adds that the “Reset for free” button isn’t currently available in Claude Code in your terminal or IDE. You’d use the web, Desktop or mobile app, and the restored usage still applies in Claude Code because limits are shared across your account (checked 2026-11-13).
Claude Code efficiency changes in the changelog
The Claude Code changelog lists several changes that can make a session waste less. Everything below was checked 2026-11-13:
| Version | Date | What changed |
|---|---|---|
| 2.1.299 | October 14, 2026 | Idle compaction: a 200K+ token conversation left idle about 54 minutes is compacted before its one-hour cache expires. Also new /usage warnings. |
| 2.1.302 | October 16, 2026 | Fixed a prompt cache miss when a tool added mid-session was loaded again. |
| 2.1.304 | October 19, 2026 | Warning on Pro and Max when resuming an inactive conversation would use a noticeable share of the 5-hour limit. |
| 2.1.305 | October 20, 2026 | /usage warnings became one-line fixes, and f applies them. |
| 2.1.311 | October 26, 2026 | Fixed /usage never showing large prompt-cache misses. |
| 2.1.312 | October 27, 2026 | Messages now say “5-hour limit” instead of “session limit”. Wording only. |
The others are efficiency or visibility changes. They help you avoid waste, or show where usage went. None of the entries above says the 5-hour allowance itself was enlarged. We didn’t read every changelog entry, so treat that as “not found” and not as proof.
Put together: Ultra is a plan difference, the Fable offers are temporary resets and promotions, and the changelog items are efficiency fixes. That’s the documented picture, and it doesn’t include “Pro or Max now lasts longer.”
Documented ways to stretch the 5-hour window
These levers come from Anthropic’s own pages, so you don’t need to rely on a rumor. Most of them are on the costs page (checked 2026-11-13).
See where usage goes
Run /usage. On Pro, Max, Ultra, Team and Enterprise plans it shows a breakdown of what counts against your plan limits, with recommendations. When the footer shows an f hint, pressing it applies the fixes Claude Code can make (needs v2.1.305 or later).
Clear and compact
The costs page says to use /clear when switching to unrelated work, because “Stale context wastes tokens on every subsequent message.” It also suggests /compact with focus instructions, such as telling it to preserve code samples. Keep instruction files short too. The page notes that CLAUDE.md loads at session start and that workflow-specific instructions can move to skills. Our own post on AGENTS.md best practices covers writing short, checkable instruction files.
Pick the model and effort on purpose
The costs page says Sonnet handles most coding tasks well and costs less than Opus, and it suggests model: haiku for simple subagent tasks. Effort matters too. The model configuration page says Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5 default to medium effort, and the costs page says you can lower effort for simpler tasks but can’t turn thinking off on those models (checked 2026-11-13). Fable models use limits faster than others, so keep them for work that needs them. If you want a method for matching models to tasks, see how to choose an AI model with a task test.
Protect the prompt cache
The prompt caching page says that on a subscription, within your plan’s included usage, Claude Code requests a one-hour cache lifetime for the main conversation, while other requests get five minutes (checked 2026-11-13). The first message after a long break can mean reprocessing the history. Switching models mid-session can also cost you a cache miss, which is why /model asks for confirmation while the cache is warm. Idle compaction from 2.1.299 exists to soften this.
Watch subagents, MCP servers and idle work
The costs page is direct: “The subagent’s own requests still draw on your usage.” Subagents keep verbose output out of your main context, but they aren’t free. For MCP servers, it says tool definitions are deferred by default, and suggests disabling servers you’re not using with /mcp and preferring CLI tools where they exist. It also lists things that spend usage while you’re idle, such as scheduled /loop tasks, cross-session messages and goal check-ins. If you run agents unattended, put a spending cap or a stop condition around them.
Don’t count on fast mode
The fast mode page says that on subscription plans, fast mode is “available via usage credits only and not included in the subscription rate limits.” So fast mode is not a way to stretch your window (checked 2026-11-13).
When you do hit the limit
The costs page describes options for when a limit hits, such as waiting and continuing after the reset, or running /usage-credits to manage usage credits.
Measure it yourself with a simple table
A single run proves nothing, because prompts vary, the cache may be warm or cold, and the model may take a different path. If you want to know whether Code Mode changes how fast your window fills, measure it the way you’d measure anything noisy: same task, several runs, both settings, written down.
Here’s a template. We didn’t run it, and nothing below is a result. Copy it into a note or spreadsheet.
# Not run here: a blank template, no results from the author
# Same task, same repo state, same model, same effort, fresh session each run.
# Record /usage (plan usage bars) right before the task and right after.
Task description (same wording every run):
Model and effort:
Claude Code version:
Date:
Run | Code Mode | /usage before | /usage after | Difference | Turns | Notes
1 | off | | | | |
2 | on | | | | |
3 | off | | | | |
4 | on | | | | |
5 | off | | | | |
6 | on | | | | |
Alternate off and on so time of day and cache state do not favour one side.
Reset the repo to the same starting point between runs (for example with git).
A few rules make the numbers worth reading:
- Change one thing. Keep the model, effort, prompt and project identical. Only the Code Mode setting changes.
- Start fresh. Use a new session each run, or
/clear, so earlier context does not leak in. - Alternate. Run off, on, off, on, so a warm cache or a busy hour doesn’t bias one setting.
- Use a task Code Mode is meant for. The docs point to repeated changes across many files, filtering search results and parallel commands. A one-line question will not show anything.
- Note the plan. On a plan with no 5-hour limit, there may be no 5-hour bar to read, so use the weekly figure or the session numbers in
/usageinstead.
If the differences between runs are bigger than the difference between settings, you have learned nothing yet. Run more. For a method that treats this as a proper experiment, our post on building your own benchmark from your logs shows how to keep honest records. And remember that a usage percentage tells you what the task cost, not whether the result was good, so check that the output was equally correct in both modes.
FAQ
Does Claude Code Code Mode save tokens or extend the 5-hour limit?
Anthropic’s Code Mode page doesn’t claim that. It describes Claude writing JavaScript that makes several tool calls in one step, and it lists limits and requirements (checked 2026-11-13). If you want to know whether it helps you, record /usage before and after the same task with Code Mode off and on, across several runs.
How do you turn on Code Mode in Claude Code?
Update to v2.1.323 or later, then start Claude Code with the CLAUDE_CODE_EXPERIMENTAL_CODE_MODE environment variable set to 1, or put it in the env block of your user settings. Confirm the one-time prompt and Claude Code restarts. It’s experimental and off by default, and you can turn it off by removing the variable or setting it to 0.
Which plans have no 5-hour limit?
Only the Ultra plan is documented that way, and only for verified accounts (checked 2026-11-13). The pricing page lists a 5-hour limit for Pro and Max. Unverified Ultra accounts get a temporary limit, and weekly limits still apply to Ultra.
Are the Fable 5.2 offers permanent?
No. For Pro and standard Team seats, the included Fable usage and one reset end on 2026-11-16 at 11:59 pm PT. For Max, Ultra and premium seats, the Fable resets expire on 2027-03-08 at 11:59 pm PT. A reset restores usage and doesn’t raise your limits.
Did the Pro or Max 5-hour allowance get bigger this autumn?
We found no Anthropic page that says so (checked 2026-11-13). What the pages document is the Ultra plan, temporary Fable offers, and Claude Code efficiency changes such as idle compaction and cache fixes. The 2.1.312 change only renamed “session limit” to “5-hour limit” in messages.
Does fast mode help your window last longer?
No. The fast mode page says it’s available via usage credits only on subscription plans and isn’t included in the subscription rate limits. Subagents also still draw on your usage, so they don’t make the window longer by themselves.
Where to go next
- Run the template above on a task you already do, and keep the numbers for a week before you decide anything.
- Read how to choose an AI model with a task test to match models to jobs.
- Check AI tools pricing in CAD, with dates when you compare plans.
- Related reading on the site as it goes live: the opinion piece on Fable 5.2 and Opus 5.5, a post on the cost per successful task, and one on kill switches and budget guards for agents.
- Re-check Anthropic’s pages before you act. Limits, offers and experimental features can change, and everything here was checked 2026-11-13.


