Code Mode is an experimental, opt-in setting in Claude Code 2.1.323 and later. Instead of calling tools one at a time, Claude writes JavaScript that makes several calls in one step and returns only what it needs. Turn it on with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1. It will not start while Claude Code's own OpenTelemetry export is on.
Anthropic shipped Code Mode in Claude Code 2.1.323 on November 12, 2026, with a switch to turn it off for a whole organization.1,2 The idea is not new: Cloudflare described a Code Mode for MCP tools in September 2025, where the model writes code against the tools instead of calling them one by one.8 We checked every requirement, limit and command below on Anthropic's own docs and changelog on November 16, 2026, and cite them inline. Fixter is our product; it comes in where Claude reads your production data over MCP.
What changes when Code Mode is on
Without Code Mode, Claude asks for one tool call such as Bash, Read or Edit, reads the result, then decides on the next. With Code Mode, Claude writes a piece of JavaScript that makes the calls, and Claude Code runs it in your session.1 In the conversation you still see the tool calls, such as an edit's diff, not the code. To read the code, press Ctrl+O and expand a Code row.1
| Code Mode off (default) | Code Mode on | |
|---|---|---|
| How tools are called | One call at a time; Claude reads each result before the next | Claude writes JavaScript that makes the calls, in parallel or chained |
| What Claude reads back | Every tool result | Only what the code returns |
| Deny and ask rules, PreToolUse hooks | Checked on each call | Still checked on each call the code makes |
| Auto mode classifier | Reviews each tool call | Reviews the code before it runs, not each call |
| Time limit | Each tool's usual limits | Ten minutes while Claude waits; up to two hours in the background |
| Resuming the session | As usual | Only in the terminal, with Code Mode still on |
| Where it works | Terminal, VS Code, Desktop, -p, SDK, cloud | Interactive terminal session only |
From the Claude Code Code Mode docs, checked November 16, 2026.1
Anthropic suggests it for 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.1 The docs publish no token or speed figure, so measure it on your own work rather than expect a number.
Does Code Mode cover MCP tools?
The Code Mode page talks about Claude's tools in general and does not list MCP tools separately.1 Claude Code adds tools through MCP servers,7 and the 2.1.325 changelog fixes Code Mode scripts leaving /mcp showing a server as connected after its sign-in expired, so MCP servers are part of what Code Mode scripts touch.3 Two things hold either way:
- Your rules still apply per call. Each tool call the code makes goes through your
denyandaskrules and yourPreToolUsehooks.1 A rule on an MCP tool uses its full name,mcp__<server>__<tool>.6 - You can check what ran as code.
Ctrl+Oopens the transcript, where each piece of code is a collapsed Code row.1
Where this matters for production work: reading a production error is a chain of calls where each one needs a value from the one before. Fixter's MCP tool docs spell out that order for Claude.9
An illustration of the call order in Fixter's MCP docs, not a recorded Code Mode session.
Without Code Mode, Claude makes those three calls one after another and reads each result before the next. That chained, filter-before-reading shape is the kind of task the Code Mode docs point to. Fixter (fixter.dev) finds and fixes the issues in your app in production, from your coding agent: errors, failing infrastructure, slow requests and downtime. It finds the root cause and fixes it: in your agent over MCP, or as a pull request ready for your review. Nothing to learn, built for small teams. Connecting it is one line, claude mcp add fixter --transport http https://mcp.fixter.dev, then sign in with /mcp.10 More on the workflow in how to debug a production error with Claude Code.
Why it will not start with OpenTelemetry export on
If Claude Code shows Code Mode (experimental) isn't available with the reason OpenTelemetry is on, Claude Code is exporting its own telemetry. The docs' fix is to unset CLAUDE_CODE_ENABLE_TELEMETRY and ENABLE_BETA_TRACING_DETAILED, if you can work without that export.1 That export is what teams use to track Claude Code's own usage, cost and tool activity.5 So today it is a choice: Code Mode, or Claude Code telemetry, not both.
Two related blocks: DISABLE_TELEMETRY also stops Code Mode, because Code Mode needs settings Claude Code downloads from Anthropic, and so does an API key helper.1 /status shows the reason Code Mode did not start.1
What this check does not cover: your app's own instrumentation. The variables the docs name are Claude Code's, not the OpenTelemetry setup your backend uses to send logs and traces to a monitoring tool. If you export Claude Code telemetry today, our post on Claude Code's OpenTelemetry export covers what you would give up.
Requirements and limits
Check these before you switch it on:1
- Version. Claude Code 2.1.323 or later, native build, 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, and not for organizations on the HIPAA configuration or zero data retention.
- Model. Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2.
- Surface. An interactive
claudesession in a terminal. Not-p, the Agent SDK, the VS Code panel, the Desktop app or cloud sessions. On Windows, Git for Windows must be installed. - Settings that block it. OpenTelemetry export,
DISABLE_TELEMETRY, an API key helper, agent teams, and a mod that checks tool calls. - Features you lose. Remote Control, Claude in Chrome and computer use. You also cannot move the session to the Desktop app or into a background session.
- Long runs. Code stops after ten minutes while Claude waits for it, including time spent at permission prompts. In auto or
bypassPermissionsmode it can run in the background for up to two hours. - Experimental. Anthropic says it may change or be removed in any release.
How to turn on Code Mode, step by step
- Check your version. Run
claude --version, andclaude updateif it is older than 2.1.323. On the stable channel, wait for it to catch up or switch to latest.1 - Start a session with the variable set. Run
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claudeto try it once, or add the variable to theenvblock of~/.claude/settings.jsonfor every new session. A project's settings files cannot turn it on, so a repository you clone cannot switch it on for you.1,4 - Confirm. Pick "Yes, turn on Code Mode". Claude Code restarts and shows that Code Mode is on near the top of the session.1
- Give it a task with many related calls. Anthropic's example: read every Markdown file in the project and list links that point to local files that do not exist.1
- Read the code. Press
Ctrl+O, expand a Code row, and pressCtrl+Oagain to go back.1
Resuming has one catch: keep the variable set to 1 when you run claude --continue or claude --resume. With Code Mode off, Claude Code refuses to resume a Code Mode session.1
How to turn it off, for you or your organization
For yourself, remove the variable from your shell and from ~/.claude/settings.json, or set it to 0, then start a new session. A 0 in one place wins over a 1 in the other.1
For a team, put the 0 in your managed settings. Anyone already in a Code Mode session keeps it until they exit or restart; after that they start without it and cannot resume their Code Mode sessions. Managed settings can only block Code Mode, not turn it on for people.1
Should you turn it on?
Our take, for a small team that works in Claude Code every day: try it in one terminal session, on purpose, for work that is many related calls. Leave it off as a default for now.
- Turn it on for repetitive changes across many files, searches you want filtered before Claude reads them, and any chain where each call feeds the next, such as going from a production issue to its logs.
- Leave it off if you export Claude Code telemetry, work mostly in VS Code or the Desktop app, use Remote Control, Claude in Chrome or agent teams, or run Claude Code through Bedrock or a gateway.
- In auto mode, add rules for the calls that write. The classifier reviews the code before it runs and does not see values computed at run time, such as a path taken from search output; Anthropic says to keep rules or hooks for calls you must control.1 For an MCP server with write tools, an
askrule per tool keeps those calls in front of you. For Fixter's server, those include changing an issue's status and saving or deleting an alert rule.6,9
MCP access is on every Fixter plan, the free one included; paid plans start at €20 a month.11 If you have no production data to point Claude at yet, connect Claude Code to your logs first; Code Mode only changes how Claude calls the tools you already have.
Key takeaways
- Code Mode lets Claude write JavaScript that makes several tool calls in one step; it is experimental and off by default
- Turn it on with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 on Claude Code 2.1.323 or later, in a terminal session only
- It will not start while Claude Code's own OpenTelemetry export is on; your app's instrumentation is a separate thing
- Deny and ask rules still apply to every call the code makes; in auto mode the classifier reviews the code, not each call
- Organizations block it with the value 0 in managed settings
Frequently asked questions
What is Code Mode in Claude Code?
An experimental, opt-in way for Claude to use its tools. Instead of asking for one tool call, reading the result and deciding on the next, Claude writes a piece of JavaScript that makes the calls, and Claude Code runs it in your session. One piece of code can run commands in parallel, pass one result into the next call, and return only the part Claude needs. It shipped in Claude Code 2.1.323 on November 12, 2026, and is off by default.
How do I turn on Code Mode in Claude Code?
Update to Claude Code 2.1.323 or later, then start it with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude, or put the variable in the env block of ~/.claude/settings.json. Confirm with "Yes, turn on Code Mode". The session then shows "Code Mode (experimental) is on" near the top. A project's settings files cannot turn it on.
Does Code Mode work with MCP servers?
The Code Mode docs describe Claude's tools in general and do not list MCP tools separately; MCP servers are how Claude Code adds tools, and the 2.1.325 changelog fixes how Code Mode scripts handled an MCP server's sign-in. Your deny and ask rules, including rules on MCP tools, still apply to each call the code makes. To see what ran as code, press Ctrl+O and expand a Code row.
Why does Code Mode say "OpenTelemetry is on"?
Code Mode does not start while Claude Code exports its own telemetry over OpenTelemetry. Unset CLAUDE_CODE_ENABLE_TELEMETRY and ENABLE_BETA_TRACING_DETAILED and start a new session, if you can work without that export. DISABLE_TELEMETRY also blocks it, because Code Mode needs settings Claude Code downloads from Anthropic. Your app's own OpenTelemetry setup is not part of this check.
How do I block Code Mode for my organization?
Add CLAUDE_CODE_EXPERIMENTAL_CODE_MODE with the value 0 to the env block of your managed settings. People already in a Code Mode session stay in it until they exit or restart; after that they start without it and cannot resume Code Mode sessions. Managed settings cannot turn Code Mode on for users.
Does Code Mode work in VS Code, the Desktop app or with claude -p?
No. Code Mode needs an interactive claude session in a terminal, on the native build. It does not work with -p, the Agent SDK, the VS Code panel, the Desktop app or cloud sessions, and not through a gateway, Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.
Sources (11), all checked November 16, 2026
- Claude Code docs, Run tool calls from code with Code Mode: how it works, requirements, limits, turning it on and off, managed settings, troubleshooting
- Claude Code release v2.1.323 (November 12, 2026): Code Mode added
- Claude Code changelog, 2.1.323 and 2.1.325: Code Mode added, then fixes to Code Mode scripts including MCP sign-in state
- Claude Code docs, environment variables: CLAUDE_CODE_EXPERIMENTAL_CODE_MODE
- Claude Code docs, monitoring usage: Claude Code's own OpenTelemetry export
- Claude Code docs, permissions: rules for MCP tools
- Claude Code docs, tools reference: built-in tools, MCP servers add tools
- Cloudflare, Code Mode: the better way to use MCP (September 26, 2025)
- Fixter docs, MCP tools reference: list_issues, get_issue, logs and the order to call them
- Fixter docs, MCP setup: the claude mcp add line
- Fixter pricing