Anthropic has added Code Mode to Claude Code, an experimental way for Claude to use its tools. Instead of calling tools one at a time, Claude writes a short JavaScript program that chains them together. The ClaudeDevs account announced it on X on November 17, 2026.
Code Mode is off by default. Developers opt in with the environment variable CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1. Anthropic warns that the feature may change or be removed in any release.
What Code Mode changes in Claude Code
Normally, Claude asks for one tool call at a time, such as Bash, Read or Edit. It reads each result before deciding what to do next. Every step is a round trip through the model.
In Code Mode, Claude writes a piece of JavaScript that makes the calls, and Claude Code runs it in the session. One program can run commands in parallel, pass one result into the next call and return only the part Claude needs to read. Anthropic's docs show an example that finds a file, edits a retry limit and runs the tests in four lines.
Users still see the tool calls, such as the diff of an edit. The code itself sits in the transcript viewer, opened with Ctrl+O, as a collapsed Code row. The second change is about waiting.
Claude can answer while commands run
Long builds and test runs no longer have to freeze the conversation. In auto mode or bypassPermissions mode, code can keep running in the background for up to two hours while the user talks to Claude. In other modes, Claude waits, and the code stops after ten minutes.
Anthropic suggests Code Mode for tasks with many related tool calls:
- Repeated changes across many files
- Searches whose results need filtering before Claude reads them
- Independent commands that can run at the same time
Permissions still apply to each call. Every tool call inside the code goes through the user's deny and ask rules and PreToolUse hooks. In auto mode, the classifier reviews each piece of code before it runs, though it can't see values computed at run time. The feature also comes with a long list of limits.
Code Mode requirements and limits
Code Mode needs Claude Code v2.1.323 or later and a Claude subscription or Console account. It works only in an interactive terminal session with Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2. On Windows, Git for Windows must be installed.
The list of places it does not work is longer:
- Surfaces: not in the Desktop app, the VS Code panel, cloud sessions,
-pruns or the Agent SDK - Providers: not through Amazon Bedrock, Google Cloud, Microsoft Foundry or a gateway
- Features: no Remote Control, Claude in Chrome or computer use
- Sessions: a Code Mode session can be resumed only in the terminal with Code Mode on
- Organizations: not with HIPAA or zero data retention setups, and admins can block it in managed settings
A repository can't switch the mode on for a user, since Claude Code ignores the variable in project settings. The idea itself is not new.
Where Code Mode comes from
Cloudflare used the name Code Mode in 2025 for letting agents write code against MCP servers instead of calling tools directly. Anthropic published its own version of the idea in November 2025. In one example, presenting MCP tools as code cut token use from 150,000 to about 2,000, a 98.7% drop.
Anthropic later turned the approach into Programmatic Tool Calling on its API. Code Mode brings the same pattern into Claude Code itself. Developers noticed the history right away.
How developers reacted
The name drew the most replies. Many found "Code Mode in Claude Code" awkward. One user asked why frontier labs are "so uniquely bad at naming things" in the first place. Others joked that they thought Claude had been doing this all along.
The most-liked request came from developer Theo, who asked Anthropic to bring Code Mode to the Agent SDK. Several others asked the same, along with support in the Desktop app. One user called the lack of Remote Control support a dealbreaker.
Early testers were split. Some welcomed answers during long Gradle builds and test runs. One user said the mode used more tokens and time in their test and that Claude often still wrote single Bash commands.
Is Claude Code's Code Mode worth turning on
For terminal users who run long builds or repeat edits across many files, it is worth a try. Parallel calls and answers during long commands target two of the most common waits in Claude Code. The permission model also stays in place for each call.
For everyone else, the limits matter more. It does not work in the Desktop app, VS Code or the Agent SDK, and sessions are tied to the mode. Anthropic labels it experimental for good reason, and early feedback on token use is mixed. The real test will come if Anthropic brings it to the Agent SDK.
Sources
- Code Mode announcement, ClaudeDevs on X – November 17, 2026
- Run tool calls from code with Code Mode, Claude Code Docs – November 2026
- Code execution with MCP: building more efficient agents, Anthropic – November 2025