Claude Code Mode Batches Tool Calls, but the Viral 37% Isn't From It

Claude Code v2.1.323 adds Code Mode, where Claude writes JavaScript to call its tools. The viral 37% token figure comes from a 2025 Anthropic API post.

By Gobi Daily2 min readFact-checked

Watch Gobi's Short

Anthropic has added Code Mode to Claude Code, an experimental opt-in in which Claude writes JavaScript to call its tools. It arrived in Claude Code version 2.1.323, which the changelog dates November 12, 2026.

How it works

Without Code Mode, Claude asks for tool calls such as Bash, Read, or Edit one at a time and reads each result before deciding what to do next. With Code Mode, Claude writes a piece of JavaScript that makes the tool calls, and Claude Code runs it in your session. According to the docs, one piece of code can run commands in parallel, use one result in the next call, and return only the part of the output Claude needs to read.

You still see the individual tool calls, like an edit’s diff, in the conversation. Pressing Ctrl+O opens the transcript viewer, where you can expand each Code row to read the JavaScript.

Anthropic suggests trying it on tasks with many related tool calls: a change repeated across many files, a search whose results need filtering, or several independent commands that can run at once.

How to turn it on

Code Mode is experimental and off by default, and Anthropic says it may change or be removed in any release. Start Claude Code with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 (or set it in your user settings) and confirm the prompt. Organizations can block it by setting the variable to 0 in managed settings.

The limits

  • Interactive terminal sessions only: not -p, the Agent SDK, the VS Code panel, the Desktop app, or cloud sessions
  • Models: Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable 5.2
  • Accounts: a Claude subscription or Console account; not through a gateway, Amazon Bedrock, Google Cloud, or Microsoft Foundry
  • Run time: code Claude waits on stops after ten minutes; background code can run up to two hours
  • Unavailable while on: Remote Control, Claude in Chrome, and computer use

About that 37 percent

Posts and summaries circulating this weekend say Code Mode cuts token use by 37 percent. The Code Mode documentation gives no savings figure. The 37 percent number matches Anthropic’s November 24, 2025 engineering post on Programmatic Tool Calling in the API, which reported average usage dropping from 43,588 to 27,297 tokens on complex research tasks. That measured a different API feature. We also found no Anthropic source for a separate “1.6x longer sessions” claim, so treat both numbers as unconfirmed for Code Mode.

Sources

  1. Run tool calls from code with Code ModeClaude Code docs
  2. Claude Code changelogClaude Code docs
  3. Introducing advanced tool use on the Claude Developer PlatformAnthropic

Fact-checked against the primary sources above on Nov 15, 2026. Spot an error?Request a correction.

More in Claude →