88Z AI, 23 November — Starting in Claude Code v2.1.323, experimental Code Mode lets Claude write JavaScript that performs several tool calls in one step. It is off by default, works in a terminal session after you opt in, may change or be removed, and has documented version, account, and feature limits.
At a glance
- Code Mode ships from v2.1.323, is off by default, and is officially experimental and possibly temporary
- Start a terminal session with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 and confirm the first time; project settings cannot enable it
- It requires a Claude subscription or Console account and an interactive terminal; it is unavailable in the VS Code panel, Desktop app, cloud sessions, Remote Control, and computer use
- Foreground code stops after ten minutes; background code can run up to two hours in auto or bypassPermissions mode; set the variable to 0 to turn it off
What Code Mode changes
In a normal session, Claude requests tools such as Bash, Read, or Edit one at a time and reads each result before deciding what to do next. Code Mode reverses that loop. You still describe the task in natural language. Claude writes a piece of JavaScript, and Claude Code runs it in the current session. One script can run commands in parallel, pass one result into the next call, and return only the output Claude needs to read. In the official example, a request to raise a retry limit may lead Claude to search for the file that contains the policy, edit the value, run the tests, and return only the file path and the test output. In the conversation you see the tool results, such as an edit diff, not the script. To read the JavaScript, press Ctrl+O, expand the collapsed Code row, and press Ctrl+O again to return.
Official docs recommend trying it on tasks that need many related tool calls: a change that repeats across many files, a search whose results should be filtered before Claude reads them, or independent commands that can run at the same time. The feature first appeared in the v2.1.323 release notes for anthropics/claude-code on 12 November 2026, with a link to the official documentation. It is off by default. Anthropic describes it as experimental and says it may change or be removed in a later release.
How to turn it on
Run claude --version first. If the version is older than v2.1.323, run claude update. If you are on the stable channel and the update still does not reach that version, wait for stable to catch up or switch to the latest channel. Then set the environment variable CLAUDE_CODE_EXPERIMENTAL_CODE_MODE to 1 when you start Claude Code. On macOS, Linux, or WSL, run CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude. In Windows PowerShell, set $env:CLAUDE_CODE_EXPERIMENTAL_CODE_MODE = "1" and then run claude. To keep it on for every new session, put the same variable in the env block of your user settings file, ~/.claude/settings.json. Official docs say Claude Code ignores this variable in a project's settings files, so a cloned repository cannot turn Code Mode on for you.
The first time you enter Code Mode, Claude Code asks you to confirm. After you agree, it restarts and shows a line near the top: Code Mode (experimental) is on, plus a note that the session can be resumed only with Code Mode on. If that line is missing, check the version, confirm the variable is 1, and remove any 0 in the shell, user settings, or a --settings file. Official docs suggest a multi-step check such as reading every Markdown file in the project and listing links that point to local files that do not exist. To resume later, keep the variable set to 1 when you run claude --continue or claude --resume. With Code Mode off, Claude Code refuses to resume that session. Sessions started without Code Mode still resume without it, even if the variable is set later.
Requirements and where it does not work
The minimum version is Claude Code v2.1.323 or later, on either release channel. You need a Claude subscription or a Console account. Official docs say you cannot use Code Mode through a gateway, Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, Microsoft Foundry, or Claude Models on Google Cloud that are Anthropic managed. Organizations that use the HIPAA configuration or zero data retention cannot use it. Supported models are Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, and Fable 5.2. The surface must be an interactive claude session in a terminal. It does not work in the VS Code panel, the Desktop app, or cloud sessions, and you cannot use Remote Control, Claude in Chrome, or computer use. You also cannot move the session to the Desktop app or turn it into a background session, and /fork cannot start a background copy.
The install must be the native build of Claude Code. Windows additionally needs Git for Windows. Using Code Mode with agent teams on requires v2.1.326 or later; teammates run in Code Mode in the default in-process display mode and start without it in split panes. Using it with feature-flag fetching off, or with OpenTelemetry events and metrics on, requires v2.1.329 or later, and tracing should stay off on any version. Some settings also block startup, such as an API key helper. These limits come from the official documentation and are not independent tests by 88Z.
Runtime limits, permissions, and how to turn it off
Unless the code can run in the background, you wait for it to finish, and it stops after ten minutes. From v2.1.328, time spent at a permission prompt in Manual and acceptEdits modes does not count toward those ten minutes. If you start in auto or bypassPermissions mode, background code can run for up to two hours, and you can keep talking to Claude. If Claude still waits instead of moving the work to the background, return to the permission mode you started in, or exit and run claude --continue --permission-mode auto with Code Mode on. Press Esc to stop code while Claude is responding or waiting. For background work, run /tasks, select the running task, and press x. After you stop it, check /tasks again for subagents, shell commands, or MCP calls that the code started and that are still running.
In auto and bypassPermissions modes, code can run from start to finish without a permission prompt, but actions that no mode auto-approves still prompt you. Each tool call inside the script still goes through your deny and ask rules and PreToolUse hooks under the tool's usual name. In auto mode the classifier reviews each piece of code, not each tool call, and it does not see values computed at run time, such as a path taken from search output, so you should still use rules or hooks for calls you must control. To read and approve the code before it starts, add an ask rule for REPL, the tool that runs the code. Sandbox settings apply to the shell commands that the code runs; the JavaScript itself and its file, web, and MCP calls run outside the sandbox. To turn Code Mode off, remove the variable from your shell and from ~/.claude/settings.json and start a new session, or change its value to 0. A 0 in one place keeps it off even if another place sets 1. Organizations can set the variable to 0 in managed settings so that nobody can use Code Mode. Users already in a Code Mode session stay in it until they exit or restart; after that they cannot resume those sessions while the 0 remains. Managed settings cannot turn Code Mode on for users.
88Z perspective
This section is 88Z's reading of the material, not a new official promise. Code Mode is aimed at the cost of stacking every intermediate tool result into context, not at making every task faster. The official examples and recommended uses are repetitive edits, searches that need filtering, and independent commands that can run together. A public X post that helped surface the feature also repeated token figures from Anthropic's earlier writing on code execution with MCP, such as one workflow falling from about 150,000 tokens to about 2,000. Those figures come from earlier material and should not be treated as a new official benchmark of Code Mode in Claude Code, or as results 88Z reproduced. If you try it, the cautious path is to confirm the version and account route, follow the official terminal steps, and use the documented multi-step prompt to inspect the code it writes, while treating the feature as experimental, removable, and impossible for a cloned repo to switch on by itself.
Sources & editorial note
This article is an AI-assisted synthesis by 88Z AI based on the public sources below. Product claims and availability are attributed to their publishers. It does not represent independent testing or first-hand reporting.
- @plusxbtSource published
- anthropics/claude-code v2.1.323Source published
Source dates above refer to the original announcements; the date under the headline is this article’s publication on 88Z AI.