Modern Creator
Nate Herk | AI Automation · YouTube

Claude Code Just Silently Released a Cheaper Mode

Code Mode makes Claude write one JavaScript program instead of calling tools one by one. In a four-job test it used about 35% fewer input tokens and was slower more often than not.

Posted
yesterday
Duration
Format
Tutorial
educational
Views
43K
463 likes
Big Idea

The argument in one line.

Claude Code's experimental Code Mode trades speed for a lighter token load by having Claude write one JavaScript program instead of calling tools step by step, and the real savings are smaller than the headline numbers suggest.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You use Claude Code in the terminal and keep bumping into usage limits during long sessions.
  • You want to know what the CLAUDE_CODE_EXPERIMENTAL_CODE_MODE setting does before you switch it on.
  • You run repetitive multi-file jobs like bulk edits, link checks or data roll-ups and wonder if scripting them through Claude is cheaper.
SKIP IF…
  • You work mainly in the desktop app, VS Code panel or cloud sessions, where Code Mode isn't available.
  • You rely on Claude in Chrome or computer use, which are switched off while Code Mode is on.
TL;DR

The full version, fast.

Code Mode is an experimental Claude Code setting where Claude writes a short JavaScript program that makes its tool calls, runs it in your session, and returns only the result it needs. Nate tested four small business jobs with it off and on. Accuracy matched, input tokens dropped about 35% (about 17% after cache pricing), but three of four jobs ran slower. Most of the saving comes from a lighter per-message tool list, so it suits long sessions, bulk edits and filtered searches. It needs terminal Claude Code 2.1.323 or later and an environment variable.

Free for members

Chat with this breakdown — free.

Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.

Create a free account →
Chapters

Where the time goes.

00:00 – 00:21

01 · Fewer tokens, but slower

Nate states the verdict of his four-job test and previews the video.

00:21 – 01:56

02 · What Code Mode is

Normal Claude calls tools one at a time and keeps everything in context. Code Mode has Claude write one JavaScript program that runs the calls and returns only what matters. Anthropic's own test cut a job from 150,000 to 2,000 tokens.

01:56 – 02:54

03 · How to turn it on

Terminal only, version 2.1.323 or later, a subscription or console account and a current model. Set CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 and confirm the opt-in screen.

02:54 – 05:11

04 · The four-job test

Top customers across 40 days of orders, broken links in 30 docs, a phone and price change across 25 pages, and one file question. Accuracy matched, input tokens fell about 35% (about 17% weighted by cost), speed was mixed.

05:11 – 06:03

05 · What it looks like in use

The chat looks normal. Ctrl+O reveals each script as a code row with its tool calls beneath it. The top-customers run used three scripts to read, check and rank.

06:03 – 07:04

06 · When to use it

Anthropic's three suggested jobs plus long sessions where you watch usage. Experimental, changing fast, 61 fixes in eight days.

Atomic Insights

Lines worth screenshotting.

  • Code Mode is a misleading name: it has nothing to do with coding tasks, it changes how Claude uses its tools behind the scenes.
  • You never write or read the code in Code Mode. You still type normal prompts, and Ctrl+O shows the generated scripts if you want to audit them.
  • In the author's setup every message carried about 60,000 tokens of instructions and tool list normally and about 38,000 with Code Mode on.
  • Most of the token saving comes from swapping many tool definitions for one code tool, not from the job itself, so even a one-file question got cheaper.
  • Cached tokens cost far less, so a 35% raw input-token cut shrank to about 17% once weighted by actual cost.
  • Anthropic's own engineers measured a Drive-to-Salesforce job dropping from 150,000 tokens to 2,000 by writing code, a 98.75% cut that small real jobs won't match.
  • Speed was mixed: a broken-link check took three minutes instead of 27 seconds because the script spawned over a hundred separate shell commands on Windows.
  • Even with Code Mode off, Claude often writes its own scripts, so the gap between the two modes is smaller than the '40 reads versus 1 script' picture implies.
  • The same job with Code Mode off took 12 seconds once and 36 seconds the next time, so a single run proves little about speed.
  • While Code Mode is on, Claude in Chrome, Remote Control and computer use are turned off.
  • Sessions started in Code Mode can only be resumed with Code Mode on.
  • The feature launched November 12 and received 61 fixes and changes in the next eight days, so any test result has a short shelf life.
Takeaway

Fewer tokens, slower runs, short shelf life

WHAT TO LEARN

Code Mode cuts Claude Code's per-message overhead and helps on bulk jobs, but the savings are real yet modest and the feature is changing weekly.

  • Code Mode swaps Claude's step-by-step tool calls for one generated JavaScript program, so the savings come mostly from a smaller tool list on every message.
  • Accuracy didn't change across the four test jobs, so the decision is purely tokens versus time, not quality.
  • Weigh tokens by what they actually cost: cache pricing turned a 35% raw input cut into about 17% real savings.
  • Speed can get worse when a script launches many tiny shell commands, which is especially costly on Windows where each starts a new shell.
  • Use it for repeated changes across many files, searches that need filtering before Claude reads them, parallel commands and long sessions where you watch usage.
  • Press Ctrl+O to open the transcript and inspect each generated script, and still ask Claude to prove its work in the deliverable.
  • Treat it as experimental: it needs terminal Claude Code 2.1.323 or later, disables Chrome and computer use, and may change or be removed in any release.
Glossary

Terms worth knowing.

Code Mode
An experimental Claude Code setting where Claude writes and runs a JavaScript program that makes its tool calls, instead of calling each tool one at a time.
Tool call
One step in Claude's agentic loop, such as reading a file or running a shell command, where Claude asks for an action and reads the result before deciding what's next.
Cached tokens
Input tokens Claude has already processed and stored, billed at a much lower rate as long as they stay in the cache.
Agentic loop
The cycle where Claude requests a tool, reads what comes back, decides the next step and repeats until the job is done.
Resources

Things they pointed at.

02:00linkClaude Code Code Mode docs
02:25toolCLAUDE_CODE_EXPERIMENTAL_CODE_MODE
01:34linkAnthropic code execution with MCP (150,000 to 2,000 tokens)
Quotables

Lines you could clip.

00:21
“Without code mode, it's like sending your assistant to the filing cabinet one folder at a time and having them read every page out loud when they get back.”
clean analogy, no setup needed→ IG reel cold open↗ Tweet quote
01:21
“It's called Code Mode, but you don't have to write any of the code. You don't even have to read it.”
clears up the confusing name in one line→ TikTok hook↗ Tweet quote
The Script

Word for word.

Read-along

Don't just watch it. Burn it in.

See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.

So Cloud Code basically secretly dropped this setting called Code Mode, and I tested it against normal Cloud Code on four real jobs. And what I found is that it used fewer tokens every single time, but the trade -off was speed. It's a lot slower.
So in this video, I'm going to show you guys what is Code Mode, what happened in my tests, how you can turn Code Mode on, and then when I'd actually use it in my own setup. So let's not waste any time and just get straight into this one. Okay, so just to start off, what actually is code mode?
Well, normally when you ask Cloud Code to do something, it works one step at a time, right? It asks to read a file and then it reads what comes back and then decides what to do next and then asks for the next file and so on. That's pretty much the agentic loop.
And each of those little steps is called a tool call. And everything that Cloud reads along the way gets stuffed into the chat and then kind of sits in its memory for the rest of the session. So code mode flips that whole thing around.
Instead of asking for tools one by one, Claude will write a short JavaScript program that makes all of these calls for it. And then Claude Code runs that program right there in your session.
Now that one program can run a bunch of commands at the same time. It can use one result to decide the next step and then hand back only what Claude actually needs to see. So without code mode, it's like sending your assistant to the filing cabinet one folder at a time and having them read every page out loud when they get back.
But with CodeMode, you can basically hand them a note that says, hey, pull all 40 folders, add up each customer, and just come back with the top three. And it's called CodeMode, but I wish they didn't call it that because you don't have to write any of the code. You don't even have to read it.
You still just type your prompts like normal. So I know the name is a little bit confusing because it sounds like a special mode for coding, but it's really just about how Cloud actually uses its tools behind the scenes. Now, what's really interesting to me is that Anthropic's own engineers actually tested this idea about a year ago outside of Cloud Code.
They had an agent pull a meeting transcript from Google Drive and attach it to a lead in Salesforce. And then when the agent wrote code instead of calling the tools directly, that job went from 150 ,000 tokens down to just 2 ,000 tokens. So I wanted to see how much of that actually shows up inside of my own work in Cloud Code.
So the first question for you guys is like, how do you actually turn this on? Well, there are a few requirements. So this only works in Cloud Code in your terminal.
So unfortunately, not right now in the desktop app or the VS Code panel or cloud sessions. You need to be on version 2 .1 .323 or later. And you need a cloud subscription or a console account.
And then one of the current models like Opus 5 .5. And then you just have to turn it on with an environment variable called Cloud Code Experimental Code Mode set to one. And I'll make sure that's up on screen right now so you can actually see what that looks like.
And you can just set that in the terminal right before you start Cloud, or you can put that in your settings file. Or what I typically do is you can just paste the docs link for Cloud Code code mode into Cloud Code and say, hey, set this up for me. Like I said, that's usually what I do.
Now, the first time you launch it, you get this screen, which basically tells you that Cloud will write JavaScript that calls its tools and that it's experimental and that Cloud and Chrome and computer use are off while code mode is on. So you just pick yes, turn on code mode, and you'll see this line at the top that says code mode is on.
Boom, you're in. Okay, so let's talk about my tasks. I made a little sandbox with four jobs that a small business might actually hand -clawed.
So find my top three customers across 40 days of order files, find every broken link in a folder of 30 docs, change a phone number and a price across a 25 -page website, and then one quick question about a single file. So what I did here is I ran every job once with code mode off and then once with code mode on. Same model, same effort, same prompt, and I ran the orders one twice.
So first, let's talk about accuracy. Every single run got the right answer in both ways. So code mode didn't make Claude any dumber or smarter.
But when we talk about tokens, code mode used fewer input tokens on all five comparisons, about 35 % fewer overall. And most of that comes from Claude's setup, not the actual execution of the job. Meaning every message that Claude sends carries all of its instructions and its whole tool list.
And in my setup, that's about 60 ,000 tokens per message with code mode off. But with code mode on, it's about 38 ,000 because all those tools get swapped for one code tool. So every message is lighter before Claude even reads your prompt, which is why even my one file question got a lot cheaper.
Now, to be fair, a lot of those tokens are cached and cash tokens obviously cost way less as long as they're still in cash. So when I weight them by what they actually cost, the savings came out closer to about 17%. But that is still real if you're always bumping into your usage limits, but it's not like the 98%.
token reduction that you might see in the headline. And also these were small jobs. So the bigger the job, I would imagine, you know, that percentage of token savings is a larger amount of tokens.
Now speed is also interesting because this was a bit mixed. Code mode is faster on the quick question and on one of the order runs, but slower on the other three tasks. And the broken links job took three minutes instead of just 27 seconds.
Now when I actually inspected the logs, its script had fired off over a hundred tiny separate shell commands, one for pretty much every link, and on my Windows machine, each one has to start up with a new shell. Without Codemode, Claude just did the whole check in one command. And in most of these jobs, Claude was already writing its own little scripts in the terminal, even with Codemode off.
So the gap was a lot smaller than the 40 reads versus one script picture makes it actually sound. Plus the same job with code mode off took 12 seconds one time and then 36 seconds the next time. So one run doesn't necessarily prove an exact pattern that's going to happen every single time.
So what does it look like when you actually use it? Well, the chat looks pretty normal. You know, here I asked for my top three customers and you still see what it's doing.
You still see that agentic loop, the file reads and the stuff like that. So you just don't see the code. To see the code, you can hit control O.
And that opens up the full transcript, and each script will show up as a row called code, with the tool calls it made sitting right underneath it. So when I pulled the actual code out, it had written three little programs. The first one read all 40 files.
The second one checked the data for problems like duplicate orders or misspelled customer names or something like that. And then the third one added up the paid orders and handed back just the ranking at the end. So here it handed back Summit Roofing, Harbor Coffee Co., and Northwind Bakery, which, you know, that's the correct answer.
And I'm always telling people to make AI prove its work, and Ctrl -O is how you can check it here, but of course you want to make it actually prove it as part of its deliverable. So now the question really becomes, when would I actually use this myself? Well, Anthropic does suggest three kinds of jobs.
So a change that repeats across a lot of files, a search where the results need filtering before Cloud reads them, and several separate commands that can run at the same time. Now, after my tests, I'd want to add one more to that list, which is long sessions where you're watching your usage since every single message is going to be a little bit lighter.
Now, keep in mind, this feature is experimental, at least at the time of filming this video, and a topic says that it could change or even get removed at any release. So as of today, you know, November, 2026, it's. Also changing super, super fast.
It launched on November 12th. And in the eight days after that, Anthropic shipped 61 code mode fixes and changes. Just classic Anthropic fashion, always shipping.
So some of what I hit on in this video may already be better by the time you watch this. So just make sure you're looking at the version you've got and testing it out. But anyways, guys, that is going to do it for this one.
So if you enjoyed or you learned something new, please give it a like. It definitely helps me out a ton. And as always, I appreciate you guys making it to the end of the video.
And I'll see you on the next one. Thanks, everyone.
The Hook

The bait, then the rug-pull.

Claude Code quietly shipped a setting called Code Mode. Nate Herk ran it against normal Claude Code on four real jobs and found fewer tokens every time, at the cost of speed.

CTA Breakdown

How they asked for the click.

FROM THE DESCRIPTION
Storyboard

Visual structure at a glance.

terminal open
hookterminal open00:00
without Code Mode
valuewithout Code Mode00:29
with Code Mode
valuewith Code Mode00:50
opt-in screen
valueopt-in screen02:41
four real jobs
valuefour real jobs03:08
inspecting the code
valueinspecting the code05:13
when to use it
valuewhen to use it06:28
Frame Gallery

Visual moments.

One-click upgrade to your Google

Get more breakdowns in your search results

Add Modern Creator as a preferred source and Google shows you more of our breakdowns in Search, Top Stories, and AI Overviews. It only changes what you see, and you can undo it in your Google settings anytime.

Add to Preferred SourcesOpens your Google source preferences with us pre-loaded. Tick the box and you're done.
Watch next

More from this channel + related breakdowns.