Anthropic has added Code Mode to Claude Code, an experimental setting in which Claude writes JavaScript that makes several tool calls in one step instead of asking for them one at a time. It arrived in v2.1.323 on 12 November 2026, and Anthropic’s new Code Mode docs page says it’s off by default.
Without Code Mode, Claude asks for a tool call such as Bash, Read or Edit, then reads the result before it decides what to do next. With it, Claude Code runs a piece of JavaScript in your session. Anthropic says 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.

What the code looks like
Anthropic’s example is a request to raise a retry limit. Claude writes code that finds the file, edits it and runs the tests, and the last line hands the file’s path and the test output back to Claude:
const files = await $`rg -l "function retryPolicy" src`.text();
const target = files.trim().split("\n")[0];
await edit(target, "maxAttempts: 3", "maxAttempts: 5");
({ edited: target, tests: $`npm test -- retryPolicy`.nothrow() });
In the conversation you see the tool calls, such as the edit’s diff, and not the code. Press Ctrl+O to open the transcript viewer, where each piece of code appears as a collapsed Code row.
Anthropic suggests trying it on tasks that take many related tool calls: a change that repeats across many files, a search whose results need filtering before Claude reads them, and several independent commands that can run at the same time.
How to turn it on
- Run
claude --version. If it’s older than v2.1.323, runclaude update. - Set
CLAUDE_CODE_EXPERIMENTAL_CODE_MODEto1, either in your shell (CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude) or in theenvblock of~/.claude/settings.json. Claude Code ignores the variable in a project’s settings files, so a cloned repository can’t turn Code Mode on for you. - Choose Yes, turn on Code Mode at the first-run prompt. Claude Code restarts and shows “Code Mode (experimental) is on”.

An organisation can block it by setting the same variable to 0 in managed settings. Anthropic says managed settings can’t turn Code Mode on for users. A session started with Code Mode can be resumed only in the terminal with Code Mode on.
Where it works
| Item | Requirement |
|---|---|
| Version | Claude Code v2.1.323 or later, on either release channel |
| Account | A Claude subscription or Console account. Not through a gateway, Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform or Microsoft Foundry |
| Models | Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2 |
| Surface | An interactive claude session in a terminal. Not -p, the Agent SDK, the VS Code panel, the Desktop app or cloud sessions |
| Organisation | No HIPAA configuration or zero data retention |
| Unavailable in Code Mode | Remote Control, Claude in Chrome and computer use |

How permissions work
Anthropic says each tool call that Claude’s code makes still goes through your deny and ask permission rules and your PreToolUse hooks, so a rule for a tool such as Bash needs no change. In auto mode, a classifier reviews each piece of code before it runs rather than each tool call, and the page says it doesn’t see values computed at run time, such as a path taken from search output. In other permission modes the code starts without a review, and you’re prompted for each tool call that would prompt you in that mode.
To check the code itself, Anthropic says to write a PreToolUse hook that matches REPL, the tool that runs Claude’s code, and read the JavaScript from tool_input.code. Code that Claude waits on stops after ten minutes. Code that runs in the background can last up to two hours, and Anthropic says that needs a session started in auto or bypassPermissions mode.
What the page says about limits
The page makes no claim about usage, token counts or Claude Code’s five-hour and weekly limits. It calls Code Mode experimental and says it may change or be removed in any release. Feedback goes through /feedback.
Claude Code’s changelog lists three Code Mode fixes in v2.1.325, released on 13 November: scripts that ignored a worktree entered with EnterWorktree, wrote ~ paths into the project and left /mcp showing a server as connected after its sign-in expired; words typed with a Yes at a permission dialog or plan approval that didn’t reach Claude; and Claude starting work by itself when you resumed a session that ended during a Code Mode script.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.




