Claude Code 2.1.323: Code Mode arrives
Most of what Claude Code does is a sequence of small tool calls, each waiting on the answer to the last. Code Mode collapses that into one piece of code, which changes what a long turn looks like — and it is off until you ask for it.
Below: what it changes, how to turn it on, what permissions and hooks still see, the limits to accept before you switch, and the rest of the release.
Last checked against Anthropic's changelog entry for 2.1.323 and its documentation on November 25, 2026. By the Omniscio team. Updated .
What Code Mode changes
Without Code Mode, Claude asks for tool calls such as Bash, Read or Edit directly, and reads each result before deciding what to do next. With Code Mode, Claude writes a piece of JavaScript that makes those calls, and Claude Code runs it in your session.
Anthropic's example is a retry limit: Claude writes code that finds the file, edits it, runs the tests, and returns only the path and the test output. One piece of code can run commands in parallel, use one result in the next call, and keep the intermediate results to itself. What you see in the conversation is the tool calls, such as an edit's diff, not the code; Ctrl+O opens the transcript viewer, where each piece of code is a collapsed Code row.
The Code Mode guide covers this in more depth, including the example and what it suits.
Sources: the "Added Code Mode, an experimental opt-in" line in the 2.1.323 entry of Claude Code changelog, and "How Code Mode works" in Run tool calls from code with Code Mode, read November 25, 2026.
Turning it on, and off
The switch is an environment variable. For a trial, set it in your shell:
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claudeTo have it on every session, put it in the env block of ~/.claude/settings.json. Anthropic notes that Claude Code ignores this variable in a project's settings files, so a repository you clone cannot turn Code Mode on for you. The first time, Claude Code asks you to confirm and restarts.
The requirements come before the switch, because most refusals are one of them: Claude Code v2.1.323 or later on either release channel, the native installer's build rather than a package manager's, a Claude subscription or Console account or a cloud provider (Bedrock, Agent Platform or Foundry, which needs v2.1.331 or later), one of the supported models (Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2), an interactive claude session in a terminal rather than the VS Code panel, the Desktop app or a cloud session, and no gateway or Claude for Government.
To turn it off, remove the variable from your shell, from ~/.claude/settings.json and from any --settings file, then start a new session — a --settings file holding 1 keeps it on. A 0 in any of those places keeps it off even if another says 1, and an organization can force it off in managed settings.
Sources: "Try Code Mode", "Requirements" and "Turn off Code Mode" in Run tool calls from code with Code Mode, read November 25, 2026.
Permissions and hooks
Code Mode does not bypass your rules. Each tool call in the code goes through your deny and ask rules and your PreToolUse hooks under the tool's usual name, such as Bash or an MCP tool's name.
The difference is where the review happens. In auto mode the classifier reviews each piece of code before it runs, not each tool call, and it does not see values computed at run time, such as a path taken from search output. That is why Anthropic's advice is to keep rules or hooks for the calls you must control.
A PreToolUse hook that checks shell commands needs to check each part of a command, the way Bash rules do, because a git push in a folder named app can arrive as cd 'app' && git push. To inspect the code itself, match REPL, the tool that runs it, and read the JavaScript from tool_input.code.
The hooks guide covers PreToolUse, and permission modes covers auto mode.
Source: "Permissions and long-running code", including "Permission checks", in Run tool calls from code with Code Mode, read November 25, 2026.
The limits to accept first
Anthropic lists six, and two of them change how a session can be used afterwards:
- Resuming. A Code Mode session can be resumed only with Code Mode on; with the variable off, Claude Code refuses to resume it. And once a session has run on a subscription or Console account, it cannot be resumed on a cloud provider.
- Auto mode. The classifier reviews the code, not each tool call, as above.
- Long-running code. Unless code can run in the background, you wait for it, and it stops after ten minutes.
- Hooks. By default expect a refused tool call when a
PreToolUsehook does not finish, for example after a timeout — but a hook that fails another way can let the call run. - Unavailable features. No Remote Control, no Claude in Chrome, no computer use in a Code Mode session.
- Moving the session. It cannot be moved to the Desktop app or turned into a background session, and
/forkcannot start a background copy.
That last group is the one people meet by accident: a session started in Code Mode is a terminal session, and it stays one.
Source: "Code Mode limitations" in Run tool calls from code with Code Mode, read November 25, 2026.
The smaller changes worth knowing
- A bigger assumed window. Claude Code now assumes a 1M context window for a model id it does not recognize, up from 200K;
/autocompactcompacts earlier, andCLAUDE_CODE_DISABLE_1M_CONTEXT=1keeps 200K. The entry also warns that sessions on other vendors' models with a smaller window can fail every turn once full until/clear, and says to setCLAUDE_CODE_DISABLE_1M_CONTEXT=1before they fill. See the context window guide. - Plugin version ranges.
engines["claude-code"]inplugin.jsonmeans a plugin outside its stated version range is not installed, updated or loaded, and install and update pick the newest version that fits.claude plugin validatenow type-checks a plugin's TypeScript hooks module, as warnings that--strictturns into a failure. See plugins. - Sandbox hardening.
git worktree add,moveandremovenow fail read-only in a session's sandbox, and write access granted through a symlink that leads elsewhere is ignored. See the sandbox guide. - Fewer credentials for its own tools. Claude Code's own ripgrep and most internal git commands now run without most of its sign-in tokens and API keys, so a credential helper or hook under such a command no longer finds them.
- More messages between your sessions. The number of messages sessions on one machine can send each other before Claude Code prompts you changed from about 20 to 100,000. See cross-session messaging.
/logoutin a background session, which is now destructive. It used to do nothing; it now signs out every session on the computer, deletes stored MCP logins and plugin secrets, and ends the session.
Sources: the "Changed the context window assumed for a model ID that Claude Code doesn't recognize", "Added `engines[\"claude-code\"]`", "Added type checking of a plugin's TypeScript hooks module", "Changed the sandbox on macOS and Linux" and "Changed the Bash sandbox on macOS, Linux and WSL", "Changed Claude Code's own ripgrep", "Changed how many messages each of your sessions" and "Changed `/logout` in a background session" lines in the 2.1.323 entry of Claude Code changelog, read November 25, 2026.
What got fixed
The entry's bug-fix list holds 195 items. These are the ones most likely to have been your problem:
- A compaction that ate an unanswered message. Running
/compactagain, or after a command such as/context, could summarize away a message Claude had not answered yet. - A resume that glued two messages together. A resumed session joined your next message to an old interrupted message that was not resumed.
- A settings edit undone. A setting saved in a running session could undo a hand edit made to
settings.jsonmoments earlier; a settings file you delete during a session now stays deleted. - A sign-out during a token renewal.
claude plugincommands andclaude mcp listcould sign you out of a Console profile when they ended while the token was being renewed. - Edits that ran out of memory. Edit and Bash could run out of memory on certain
/procfiles, and Edit could hang on devices and named pipes.
Sources: the "Fixed" lines under "195 bug fixes" in the 2.1.323 entry of Claude Code changelog, read November 25, 2026.
Who 2.1.323 matters to
| If you… | Read this part |
|---|---|
| Run long turns with many related tool calls | What Code Mode changes, then turning it on |
| Write hooks or permission rules | Permissions and hooks |
| Resume sessions, or move them between surfaces | The limits to accept first |
| Publish plugins | Plugin version ranges |
Everyone else can update and read nothing, with 195 fixes behind them and one quiet change that matters: an unrecognized model id is now assumed to have a 1M window.
If you are not on this version yet, claude --version prints the version you have and claude update updates the install; the update guide covers each install type. Newer releases exist: Anthropic's changelog lists them.
This table is our summary of the sections above; every row rests on the changelog and documentation lines cited in those sections, read November 25, 2026.
Where these answers come from
- The release, its date and every change listed: the 2.1.323 entry in Claude Code changelog, generated from CHANGELOG.md, read November 25, 2026.
- What Code Mode does, how to turn it on and off, how permissions see it, and its limits: Run tool calls from code with Code Mode, read the same day.
No Claude Code release was installed on this site's machine to check this page. Every claim about 2.1.323 is taken from Anthropic's changelog entry and the documentation page named above.
Common questions
What is Code Mode in Claude Code?
An experimental opt-in added in 2.1.323 in which Claude writes JavaScript that makes the tool calls, and Claude Code runs that code in your session. One piece of code can run commands in parallel, use a result in the next call, and return only the part of the output Claude needs.
How do I turn Code Mode on?
Set CLAUDE_CODE_EXPERIMENTAL_CODE_MODE to 1 in your shell or the env block of ~/.claude/settings.json, then start claude and confirm when it asks. It needs Claude Code v2.1.323 or later on the native build.
Does Code Mode skip permission checks?
No. Each tool call in the code still goes through your deny and ask rules and your PreToolUse hooks under the tool's usual name. In auto mode the classifier reviews the code rather than each call, so it cannot see values computed at run time.
Which features does Code Mode not work with?
Anthropic lists no Remote Control, no Claude in Chrome and no computer use in a Code Mode session, and such a session cannot be moved to the Desktop app or turned into a background session. It also needs the right account, model and installation.