On November 19, 2026, Anthropic enabled an experimental capability inside Claude Code called Code Mode. The premise is simple enough to state in one line: instead of the model calling tools one at a time, it writes a JavaScript script that orchestrates several tool calls at once, and can keep executing in the background while the conversation continues.
The official announcement came through the ClaudeDevs account and the Code Mode documentation page at code.claude.com/docs/en/code-mode. Enablement is a single environment variable: CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1.
What Changes Mechanically
The old path. In previous Claude Code behaviour, every tool invocation was a discrete round trip. The model calls Bash, or Read, or Edit, waits for the terminal to return, reads the output, and decides the next step. For a task touching fifteen files, that is fifteen sequential decisions, each gated on a full round trip through the model.
The new path. In Code Mode, a task request produces a whole JavaScript script. That script can run multiple commands concurrently inside the local environment. It captures the output of one command and passes it directly into the next, filters data locally, and returns only the essential result back to the main context.
The distinction is not speed. It is where the token budget gets spent. In the old path, search results, directory listings and intermediate tool output all flow back into the conversation context, where they consume tokens and compete for attention. In Code Mode, that filtering happens before anything reaches the model. Only the compressed result — a file path, a pass/fail line, a specific diff hunk — travels upward.
A concrete example from the documentation: a cross-file batch modification that would previously require dozens of round trips now becomes one script. It searches the terminal for the designated function path, captures the first matching file path, hands that to the next step for the code replacement, then runs the test command. Only the modified files and the test output return to the main conversation.
Where the Calls Actually Land
The daily conversation view is not flooded by these calls. The main window still shows conventional execution records and modification diffs. What collapses is the intermediate chatter.
To inspect the script itself, Ctrl+O opens the full conversation history, where the folded Code tags unfold to reveal the JavaScript body. This is the audit path: the work is still there, just not occupying the primary view. For teams that review agent actions, that is the right trade — compression in the default view, full detail one keystroke away.
Three Scenarios That Fit
The documentation names three, and they share a structural property: each one is wasteful under sequential round trips.
Repeated modification across many files. The cost in the old path is not per-file editing, it is the model re-reading context between files. A script collapses the loop.
Tasks whose search results are too large to load into context. When a search returns hundreds of matches and only three matter, sending all of them through the model is pure overhead. Local filtering before the context handoff removes that cost entirely.
Multiple independent commands that can run concurrently. Sequential execution of independent work is latency without benefit. Parallel execution inside one script recovers it.
What does not fit is a task requiring judgment between every step. If each command’s output should change what happens next in a way only the model can decide, scripting them upfront produces a brittle batch. The model needs to see the intermediate result. That is the boundary.
Supported Models and Runtime Requirements
| Requirement | Value |
|---|---|
| Models | Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 |
| Claude Code version | v2.1.323 or later, native installation |
| Account type | Anthropic official subscription or Console direct account |
| Windows | Git for Windows must be installed first |
| Multi-agent teams | v2.1.326 or later, default in-process mode only |
| Interface scope | Terminal interactive conversation only |
The account restriction is the strictest constraint in the release. Code Mode does not work with third-party platforms, cloud service providers or gateway-routed requests. Environments with HIPAA compliance requirements or zero-data-retention policies are also excluded. This is a deliberate boundary — the feature depends on execution semantics that a proxied request path cannot guarantee.
That constraint has a practical consequence for teams that route most of their traffic through an aggregator. Code Mode runs only on a direct official connection. Everything else — batch jobs, secondary agents, background analysis — can still flow through a consolidated path. 4sapi is an API gateway that keeps those non-Code-Mode workloads on a single routing layer, so a mixed stack does not require two sets of credentials scattered across clients. The two paths coexist; they do not merge.
Interface scope is narrower still. Code Mode does not apply to the VS Code panel, the desktop client, cloud conversations, scripted invocations with the -p flag, or the Agent SDK. It is a terminal-interactive feature, and only that.
For multi-agent team setups, the version floor rises to v2.1.326, and the mode must be the default in-process configuration. Split mode degrades automatically.
Enabling It
The variable must be set manually; there is no toggle in the interface.
To apply it to every conversation, write the same value into the env block of settings.json in the user directory. Project-local bundled configuration files cannot activate the feature — presumably to prevent a repository from silently switching on experimental execution for everyone who clones it.
First launch triggers a confirmation dialog in the terminal. Confirming restarts the program automatically, and the window header then shows that experimental code mode is active.
Two persistence rules follow. Resuming a historical session requires the environment variable to still be set to 1; the program refuses otherwise. To disable completely, either delete the variable or set it to 0. Enterprise administrators can set 0 in the admin console to disable it organization-wide, which blocks the feature regardless of local configuration.
Permission Control: Static Review, Not Dynamic
This is the part of the release most likely to be misread, so it deserves precision.
In auto mode, the system performs one static review of the entire script before execution begins. It does not intercept execution paths computed dynamically from variables at runtime. A path assembled from a variable, or a target resolved conditionally inside the script, will not be caught by that pre-execution pass.
In other permission modes, the opposite trade applies. There is no whole-script pre-review, but each individual tool invocation inside the script still triggers its own approval dialog. The granularity returns to per-call consent, at the cost of the interruptions Code Mode was meant to remove.
Neither arrangement is strictly safer than the other. They fail differently. Static review scales to a script but cannot see runtime-computed targets. Per-call approval sees every action but relies on the operator reviewing dozens of prompts in sequence, which invites reflexive approval.
The practical rule: scripts that build file paths or command targets from variables should not run unattended in auto mode. Anything whose target set is determined by data rather than by the prompt belongs behind per-call approval or behind a narrower permission scope.
Background Execution and the Ten-Minute Ceiling
Execution behaviour depends on the starting mode.
Normal state. Claude waits synchronously for the script to finish. A single execution is capped at roughly ten minutes, and that window includes the time the user spends deciding on any permission prompt. Waiting on a human counts against the same budget as running the command.
Auto mode or permission-bypass mode. The script moves to the background. The maximum execution window extends to two hours, and the user can keep sending new messages while the task continues. This is the headline capability: long-running work that no longer blocks the conversation.
One interaction detail in auto mode needs stating. If a previous background task is still running and the model writes a new script, the system cancels the previous task’s classifier protection. The terminal then raises an approval prompt with a 1-minute-59-second countdown. If the user does not decide before the countdown ends, the request is automatically interrupted, and subsequent requests in that session will not prompt again.
That countdown is a safety mechanism with a sharp edge. It prevents an unattended background task from running indefinitely under stale approvals, but it also means a slow human response converts into an automatic denial. Operators should know that a timeout produces a denial, not a retry.
Why the Feature Might Refuse to Start
If Code Mode reports unavailable at startup, the environment is restricted. Documented causes:
- Version below the required floor.
- Use of a third-party proxy address.
- An API-key helper tooling layer in the request path.
- A disable-flag environment variable already present.
- OpenTelemetry export enabled.
- Startup under permission-bypass or a disabled setting.
The common thread is the request path. Code Mode requires a direct official connection with a known execution environment; anything that abstracts the endpoint breaks the contract it depends on.
There are also two capability gaps stated plainly in the documentation. Code Mode does not support remote control, Chrome browser-extension linkage, or desktop screen control. In-progress sessions cannot be migrated to the desktop client, and background tasks cannot be dispatched through fork instructions.
What This Signals
Code Mode is a structural change in how an agent spends its context, not a new model capability. The model is unchanged. What changed is the ratio between reasoning steps and tool round trips: instead of one decision per call, one script per batch, with local filtering before anything reaches the context.
The three boundaries are worth keeping in view. It runs on four models and one interface. It requires a direct official connection, which excludes aggregator-routed traffic. And its permission model trades static whole-script review for the inability to see runtime-computed targets.
For teams adopting it, the sensible sequence is a single batch operation with a fixed, enumerable target set — a mechanical refactor across a known directory, or a search-then-filter flow where the patch affects only cached artifacts. Confirm the script body via Ctrl+O, confirm the permission envelope, then extend to background execution. Scripts whose targets are computed at runtime are the last thing to enable, not the first.




