MakeBoxEtsy + Claude

Claude Code.
Same model.
Fewer round trips.

An experimental Code Mode lets Claude write one short JavaScript program that calls its tools, instead of calling them one at a time and reading every intermediate result. Nothing about the model changed. The loop around it did.

Watch the loop change ↓

Write the program. Keep the noise out. Return the answer.

MakeBox EditorialNovember 21, 20269 minute read
Claude Code · experimental
2

tools the model sees with Code Mode on
REPL runs the code · Poll follows background work

v2.1.323Minimum Claude Code version
OffBy default. Opt in per user
// illustrative script shape
const files = await glob("src/**/*.ts");
const hits = [];
for (const f of files) {
  const text = await read(f);
  if (text.includes("oldApi(")) hits.push(f);
}
// only this reaches the chat:
return hits;

Helper names in the snippet are simplified for illustration. Facts: Anthropic’s Code Mode docs.

01 — The old shape of an agent

Every result took
a detour through
the model.

The classic loop

A coding agent normally works in a strict rhythm. The model asks for one tool—read a file, run a command, query an MCP server. The tool answers. That answer is added to the conversation, the model reads it, decides the next step and asks for the next tool.

The pile-up

For a few steps that is fine. For a task like “check 40 files for a deprecated call” it becomes wasteful: all 40 file bodies land in the context window, even though the model only needs the three file names that match.

The re-reading

Later turns carry that history along, so the same text is processed again and again. Prompt caching makes re-reading cheaper, but it doesn’t make it free.

Code Mode

The idea behind Code Mode is old programming common sense: if the steps can be written as a loop, write the loop. A small program reads and filters the files outside the chat, and the model receives only the three names it needs.

Model
ToolsGlob · Read
Conversation context 2 results40 full files40 files, read again3 file names
One request, one answer, one decision—repeated for every file.Every file body is added to the chat.Each new turn processes the history again.The program does the loop. Only the result returns.Illustrative diagram, not a measurement.
02 — What Anthropic actually shipped

Two tools in front.
All the usual tools
behind them.

REPL

Code Mode arrived as an experimental, off-by-default option in Claude Code v2.1.323, released in mid-November 2026. With it on, Claude stops calling Bash, Read or Edit one by one. It writes JavaScript, and the REPL tool runs that code inside your session. Anthropic docs.

Same tools, same names

Inside a script, tools keep their usual names—including MCP tools—so one program can combine file work, shell commands and connected services in a single step.

Rules still apply

Every tool call inside the code still passes your deny and ask rules and PreToolUse hooks, under the tool’s normal name. In auto mode, the classifier reviews the script before it runs—not each call, and without seeing run-time values. Add "ask": ["REPL"] to approve each script yourself.

Sandbox covers shell only

Sandbox settings apply to shell commands. The JavaScript itself and its file, web and MCP calls run outside the sandbox—so permission rules, not the sandbox, are what guard them.

Poll

The second tool, Poll, follows code that keeps running in the background. Foreground code stops after ten minutes; background code can run for up to two hours. A YouTube walkthrough by Агенты Романа (in Russian), which prompted this article, also says variables survive between REPL calls. Anthropic’s page doesn’t state this either way.

REPL · script
Claude sends one script to REPL.The script calls tools by their usual names.Each call passes your rules and hooks.Only shell commands sit inside the sandbox.Poll checks on long-running work.Illustrative script. Tool names simplified.

Why not just a Bash script?

Claude could always write a shell or Python script. The difference is reach: an ordinary script lives in the operating system and can’t call the agent’s own tools or its MCP connections. Code Mode gives the program the agent’s toolbox, with the agent’s permission checks.

Swipe the table to see all columns.

Four places code can run around an agent
ApproachWhere the code runsWhat it can callWhat returns to the model
Bash or Python scriptYour shellPrograms and files on the machineWhatever the script prints
Claude Code Code ModeYour Claude Code session (JavaScript)Claude Code tools by name, including MCP tools, with permission rules per callWhat the script returns
Server-side Code Mode (e.g. Cloudflare)The provider’s sandboxThat provider’s API onlyWhat the script returns
Gateway (e.g. Executor)The gateway’s environmentServices connected to the gatewayWhat the script returns

Based on Anthropic, Cloudflare and the Executor README (MIT; agents get two tools, skills and execute).

02b — Not a new idea

A year of “let the
model write the glue”.

  1. Cloudflare names it “Code Mode”

    Kenton Varda and Sunil Pai argue that models are better at writing code that calls MCP than at calling MCP directly—they have seen far more code than tool calls. Code runs in V8 isolates with internet access blocked. Post

  2. Recursive Language Models

    Alex Zhang and Omar Khattab (MIT CSAIL) put a long prompt into a Python REPL as a variable and let the model peek, grep and call sub-models on parts of it. Post

  3. Anthropic: Programmatic Tool Calling

    An API feature where Claude writes orchestration code and only the final output returns to its context. Anthropic reports 37% fewer tokens on complex research tasks. Post

  4. Cloudflare’s whole API in two tools

    search and execute cover 2,500+ endpoints in about 1,000 tokens of tool definitions. Post

  5. browser-use 1.0

    The browser agent library deletes 80% of its code; the agent now writes Python in one persistent REPL directly on the Chrome DevTools Protocol. Release

  6. Claude Code v2.1.323

    Code Mode reaches the agent’s built-in tools, not only MCP servers. Docs

03 — Turn it on

One variable.
A few places
it won’t run.

You need Claude Code v2.1.323 or later (agent teams need v2.1.326). Check with claude --version. Then start a session with the variable set:

CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude

Or keep it on for your user account in ~/.claude/settings.json:

{
  "env": { "CLAUDE_CODE_EXPERIMENTAL_CODE_MODE": "1" }
}

On first use Claude Code asks you to confirm, then shows that Code Mode is on. A project’s settings file can’t switch it on, so a cloned repository can’t enable it for you. Admins can force it off in managed settings by setting the variable to 0. To resume such a session later, keep the variable set when you run claude --continue or --resume.

Where it works today

  • Terminal (CLI)Supported. Needs the native build; on Windows also Git for Windows. apiKeyHelper, OpenTelemetry export or DISABLE_TELEMETRY block startup.
  • Desktop appNot supported, including moving a session to it.
  • VS Code panelNot supported. Use the terminal CLI.
  • Cloud & background sessionsNot supported, and neither is Remote Control.
  • Claude in Chrome, computer useNot supported.
  • Bedrock, Foundry, gatewaysNot supported through cloud providers or gateways.
  • HIPAA, zero data retentionNot supported.

From the Code Mode documentation, checked November 21, 2026. The feature is experimental and “may change or be removed in any release”.

Using hooks or plugins?

In the source video the first launch failed because an installed extension relied on Claude Code hooks. Anthropic documents several hook details for Code Mode: a PreToolUse hook that times out refuses the call; Bash hooks must check every part of a compound command; a PostToolUse hook matching REPL can redact output. If startup fails, read the message—it usually names the setting or hook in the way.

04 — The numbers, sorted by what they measure

Big percentages.
Different things
being counted.

Headlines about this trend mix three kinds of numbers: the size of tool descriptions, the tokens a whole task used, and the cost of a run. They aren’t interchangeable. Anthropic’s Code Mode page itself publishes no savings figure.

Vendor measured1.17M → ~1,000

Tokens to describe Cloudflare’s API

Two tools instead of one per endpoint across 2,500+ endpoints, counted with tiktoken. This is the size of tool definitions, not the cost of a task.

Cloudflare, Feb 2026
Vendor measured−37%

Tokens on complex research tasks

Average usage fell from 43,588 to 27,297 tokens with Programmatic Tool Calling in Anthropic’s API. A related API feature, not Claude Code’s Code Mode.

Anthropic, Nov 2025
Author reported≈½ input · −29% cost

Claude Code with and without Code Mode

The video’s author ran a series of open-source coding tasks both ways and reports about half the input tokens and a total cost of 71% of normal. No dataset was published; MakeBox did not repeat the test.

Video, 13:25
Vendor measured2.7–5.2× cheaper

browser-use 1.0 on the same models

The release claims up to 33 points higher scores and 2–3× faster runs. Its own table notes an OpenAI outage during the run; with provider errors excluded, the score gap against its previous agent wasn’t significant.

browser-use, Nov 2026
0

Savings figures on Anthropic’s own Code Mode page. Any percentage you see for Claude Code comes from someone’s test, not from Anthropic’s documentation.

Retellings sometimes quote larger numbers for browser-use (for example “90% of the code removed”). The release notes say 80%, or 136,866 lines.

Where it may be heading.

ANALYSIS · SCROLL TO EXPLORE · SWIPE ON MOBILE

Skip visual story ↘
01 / TOOLS

One call,
one answer,
one decision.

The model is the loop. Every intermediate result passes through it.

02 / PROGRAMS

The model writes
the loop instead.

Today’s Code Mode: a program calls the tools and returns only what matters.

03 / ORGANIZER · SPECULATIVE

The program runs
the team.

A possible next step: code that creates sub-agents and decides what stays in the active context. Not shipped as described.

Conceptual diagram. Stage 03 is our reading of public research, not an announced Anthropic product.

05 — Sub-agents and recursive models

From calling tools
to managing
its own memory.

Anthropic’s documentation already mentions agent teams working with Code Mode (from v2.1.326). The video’s author goes further: he reports finding unreleased functions in the Claude Code binary for creating, listing and releasing contexts—likely sub-agents controlled from code. They aren’t documented, and we couldn’t verify them.

The direction matches a research line called Recursive Language Models. There the model doesn’t read a huge input at all. The input sits in a REPL as a variable; the model searches it, splits it and sends parts to sub-models. In the authors’ tests on the OOLONG benchmark at about 132,000 tokens, this setup around the smaller GPT-5-mini beat GPT-5 by more than 34 points. The authors also list the limits: recursive calls block each other, there is no prefix caching, and total cost and runtime have no strong guarantees.

The same idea could apply to a long coding session. Instead of automatic compaction squeezing old history, a model could keep the history as data and choose what to bring back. The catch is caching: Anthropic’s context editing feature warns that clearing old tool results invalidates cached prompt prefixes and causes new cache-write costs. Editing memory freely is not automatically cheaper.

06 — Our take

The harness is now
part of the model’s
performance.

Model releases get the headlines, but this change shows how much depends on the environment around a model. The same Claude can spend far fewer tokens when it is allowed to write the glue code itself. Expect more of the agent’s “plumbing” to move into code the model writes.

If you write code with Claude Code: try Code Mode on a branch, in the terminal, for tasks with many reads, searches or MCP calls. Keep ask rules for risky commands such as git push, consider "ask": ["REPL"] for the first days, and compare your own usage before and after. Don’t rely on the sandbox for the JavaScript part.

If you use Claude with business tools: Code Mode applies to Claude Code in the terminal, not the Claude apps. MCP tools can be called from its scripts under their normal names, so keep confirmation rules on anything that writes, publishes or spends. We have not yet tested MakeBox’s Etsy connector under Code Mode.

Connect your Etsy shop
to Claude.

MakeBox’s MCP connector gives Claude your listings, keywords and shop data—with confirmation before any change on Etsy.

See the Etsy MCP ↗
FAQ

Short answers.

Is Code Mode a new Claude model?

No. It changes how Claude Code exposes tools to the model. Claude writes JavaScript that calls tools such as Bash, file editing or MCP tools, and Claude Code runs the code in your session.

How do I turn on Code Mode in Claude Code?

Use v2.1.323 or later and set CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in your shell or in the env block of ~/.claude/settings.json. Confirm the prompt on first use. Project settings files ignore this variable.

Does Code Mode make Claude Code cheaper?

It can, when a task involves many tool calls whose intermediate output doesn’t need to reach the model. Anthropic publishes no savings figure for Code Mode. One YouTube author reported about half the input tokens and 29% lower cost in his own tests; that isn’t an official or independently verified number.

Does Code Mode bypass permissions?

According to Anthropic, each tool call inside the code still goes through deny and ask rules and PreToolUse hooks. In auto mode, the classifier reviews the code before it runs, not each call. Sandbox settings cover shell commands only.

Where does Code Mode not work?

The Desktop app, the VS Code panel, cloud sessions, Remote Control, Claude in Chrome, computer use, gateways and cloud providers such as Bedrock and Foundry, and HIPAA or zero data retention setups.

How is it different from Cloudflare’s Code Mode?

Cloudflare runs model-written code in its own sandbox against its own API. Claude Code’s version runs in your session and can call any of the agent’s tools, including several MCP servers in one script.

Reviewed November 21, 2026. MakeBox did not run its own Code Mode benchmark; percentages are attributed in the text to the parties that reported them. Diagrams and code snippets are illustrative MakeBox drawings, not screenshots of Claude Code. Published November 21, 2026.