@readmodelmag
MODEL

Tools

Claude Code's Code Mode reaches the stable channel: what it does, and the catch

SummaryCode Mode has Claude write JavaScript that runs several tool calls in one step, including background scripts for up to two hours. A week after launch, the stable channel has caught up.

· MODEL Editors · 3 min read

Some links may be affiliate links. Disclosure

MODEL news card on a cream background. Small red kicker: CODE MODE / CLAUDE CODE. Large red text: 2 hours. Black headline: Background scripts. Your rules still apply. Bottom left: MODEL. Bottom right: Sources: Claude Code docs + changelog, Nov 2026.
MODEL card for this story. Illustration by MODEL. Original. Image source.

Code Mode is getting a second wave of attention. On Saturday, Addy Osmani, who works on Claude Code at Anthropic, posted a walkthrough asking developers to try it (X (opens in a new tab)). Here is what Anthropic's docs and changelog say, checked Nov. 21.

What it does. 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 it, Claude writes a piece of JavaScript that makes the tool calls, and Claude Code runs that code in your session. One script can run commands in parallel, feed one result into the next call, and return only the part of the output Claude needs (Anthropic docs (opens in a new tab)). Anthropic suggests it for changes that repeat across many files, searches whose results need filtering, and independent commands that can run at once.

Background scripts. If you start the session in auto or bypassPermissions mode, code can keep running in the background for up to two hours while you keep talking to Claude. Otherwise Claude waits, and the code stops after ten minutes. Use /tasks to see and stop background code. To read the JavaScript Claude wrote, press Ctrl+O and expand a Code row.

Your rules still apply, with one catch. Each tool call in the code still goes through your deny and ask rules, your PreToolUse hooks and your sandbox settings for shell commands. But in auto mode, the classifier reviews each piece of code, not each tool call, and "doesn't see values computed at run time." The docs also say the JavaScript itself and its file, web and MCP calls run outside the sandbox; for full isolation, they point to a container or VM. We covered the permission side in more detail in our Nov. 15 builder tip.

What changed since launch. Code Mode arrived in v2.1.323 on Nov. 12. As of 4:33 p.m. PT Nov. 21, npm's stable tag for @anthropic-ai/claude-code is 2.1.323, so stable-channel users can now turn it on; latest is 2.1.330, released Nov. 20 (npm (opens in a new tab)). Each changelog entry since launch, v2.1.325 through v2.1.330, lists Code Mode fixes. Highlights from the changelog (opens in a new tab):

  • v2.1.326: works with agent teams turned on.
  • v2.1.328: in Manual and acceptEdits modes, time at a permission prompt no longer counts toward the ten-minute limit, and UserPromptSubmit hooks no longer receive code output.
  • v2.1.329: can be turned on with OpenTelemetry events and metrics enabled (tracing still keeps it off). A PreToolUse hook that fails (other than timing out) no longer refuses a script's call by default; set "onFailure": "block" on hooks that must refuse.

Limits. It is experimental, off by default and "may change or be removed in any release." It works only in an interactive terminal session (not the VS Code panel, Desktop app or cloud sessions), on the native build, with a Claude subscription or Console account directly on the Anthropic API (not Bedrock, Google Cloud, Foundry or a gateway), and with Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2. Not with HIPAA or zero-data-retention setups, and not with Remote Control, Claude in Chrome or computer use.

How to try it. Update to v2.1.323 or later, then run:

CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude

Confirm the prompt. To resume that session later, keep the variable set. Admins can block it with the variable set to 0 in managed settings.

Our take. Worth trying for multi-file audits and batch edits. If a hook guards something important, update it for v2.1.329's new default, and keep hard limits in deny rules or a sandbox, not in the classifier.

From Anthropic's documentation and changelog. Token or speed savings shared on X are not in the docs, so we left them out. MODEL has not run Code Mode for this story. Not sponsored. -- MODEL Editors

Get three tested tools every Friday

Free, weekly. Unsubscribe anytime.

Sources

  1. Run tool calls from code with Code Mode

    Anthropic (Claude Code docs)

  2. Claude Code changelog

    Anthropic

  3. @anthropic-ai/claude-code on npm

    npm

  4. Addy Osmani on Code Mode

    X

FREE · EVERY WEEK

The top AI tools this week, tested.

Every week MODEL's editors pick the AI tools worth your time, try them hands-on, and tell you what's good, what's not, and who it's for. Free, in your inbox.

Free. Unsubscribe anytime. Our picks are editorial and can't be bought.