# Claude Code's Code Mode: What It Is and Who Should Try It

> Claude Code 2.1.323 added Code Mode on 12 November 2026: Claude writes a script that runs many steps at once. The limits, the risks and who should wait.

Canonical: https://bridge-terminal.com/atlas/blog/claude-code-code-mode-explained/
Last updated: 2026-11-16

Published 16 November 2026 · Plain English · What's new · 7 min read

## The short version

- Code Mode is an experimental, off-by-default option in Claude Code (added in version 2.1.323 on 12 November 2026) where Claude writes a short JavaScript program that makes many tool calls in one step.
- It is meant for jobs with many related steps, such as the same change across many files or a search whose results need filtering first. Anthropic does not claim it is cheaper or faster.
- Anthropic says it may change or be removed in any release. It works only in an interactive terminal session, a Code Mode session can be resumed only with Code Mode on, and code that Claude waits for stops after ten minutes.
- Deny and ask rules and PreToolUse hooks still apply to each step the script takes, but in auto mode the safety check reviews the whole script, not each step, and cannot see values worked out while it runs.
- Atlas has no Code Mode switch today. Support is coming to Atlas, built in, so it needs no setup; until then, a team using Claude Code directly can try it on one low-risk task and compare the result.

Code Mode is a new, experimental way for Claude Code to work. Instead of asking for one action at a time, Claude writes a short JavaScript program (JavaScript is a common programming language) that makes several tool calls in a single step. Anthropic added it in Claude Code version 2.1.323 on 12 November 2026, and it is off unless you turn it on. If you build software with an AI coding agent, the question is whether to try it now. For most teams the answer is: only on a small, low-risk task, and with the limits in mind.

## What is Claude Code Code Mode?

Normally, Claude Code works like a person at a counter. It asks for one thing, such as reading a file, running a command or editing a line. It looks at the result. Then it decides what to ask for next.

With Code Mode, Claude instead writes a small script that carries out a whole chain of those steps. According to [Anthropic's Code Mode documentation](https://code.claude.com/docs/en/code-mode), one script can run commands side by side, use the result of one step in the next, and return to Claude only the part of the output it needs to read.

Anthropic gives a simple example. Asked to raise a retry limit, Claude might write a script that searches for the right file, changes the number and runs the tests. The script then hands back the file's path and the test output.

You still describe your task in plain words. In the conversation you see the tool calls, such as the diff (the before-and-after view) of an edit, but not the script. To read the script, press Ctrl+O to open the transcript viewer, where each script appears as a collapsed "Code" row.

## What changed, and when?

The Claude Code [changelog](https://code.claude.com/docs/en/changelog) lists Code Mode under version 2.1.323, dated 12 November 2026, as "an experimental opt-in in which Claude writes JavaScript to call its tools".

Anthropic's own page is plain about that status: Code Mode is experimental, off by default, and "may change or be removed in any release". That is a useful signal. This is something to test, not something to build a team routine on.

## When could it help?

Anthropic suggests trying it on tasks that take many related tool calls:

- A change that repeats across many files.
- A search whose results need filtering before Claude reads them.
- Several independent commands that can run at the same time.

Think of a tidy-up such as "update the company name in every document". Anthropic's own trial prompt is similar: read every Markdown file in a project and list the links that point to local files that do not exist. These are jobs with lots of small steps, where Claude would otherwise go back and forth.

The documentation does not say Code Mode is cheaper or faster, so do not assume it. Treat any gain as something to measure on your own work.

## What are the limits?

This is where many teams will stop. The documentation lists several:

- **Terminal only.** It works in an interactive `claude` session in a terminal. It does not work in the VS Code panel, the Desktop app, cloud sessions, the Agent SDK (Anthropic's toolkit for building your own agents), or `-p` mode (the one-shot mode used for automated runs).
- **Accounts.** You need a Claude subscription or Console account. It does not work through Amazon Bedrock, Google Cloud, Microsoft Foundry or a gateway. Organizations that use the HIPAA configuration or zero data retention cannot use it.
- **Models.** Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2.
- **Resuming.** A Code Mode session can be resumed only in the terminal, with Code Mode switched on. Otherwise Claude Code refuses to resume it.
- **Waiting limit.** Unless the script can run in the background, Claude waits for it, and it stops after ten minutes. Background scripts can run up to two hours, but you need to start the session in auto mode or bypass-permissions mode.
- **Missing features.** Remote Control, Claude in Chrome and computer use are not available. You cannot move the session to the Desktop app.
- **Clashes with other settings.** It will not start with some settings on, including an API key helper, agent teams (several agents working together), OpenTelemetry export (a way of sending usage data to a monitoring tool), or the setting that turns telemetry off.

If your team relies on automated runs, monitoring, or several agents working together, Code Mode is probably not for you yet.

## How do safety rules work with Code Mode?

This is the part founders and managers should read twice.

Each tool call the script makes still goes through your "deny" and "ask" permission rules and your PreToolUse hooks, which are small checks that run before an action. So a rule that says "never run this command" is still consulted.

There is one important difference in auto mode, where a safety checker decides for you instead of asking each time. In Code Mode, the checker reviews each piece of code before it runs, not each tool call. Anthropic notes it cannot see values worked out while the code runs, for example a file path taken from search results. So if a step must never happen, keep a rule or hook for it. Anthropic also describes a way to check the script itself: a PreToolUse hook that reads the JavaScript before it runs.

Anthropic also warns that rules on commands match the command's text, so a denied command can sometimes be run in a form the rule does not catch, with or without Code Mode. For limits that do not depend on text, it points to sandboxing, which fences off what a command can touch.

One more detail: if a PreToolUse hook fails or times out on a call from Claude's script, the call is refused, even if you did not ask the hook to block on failure. That is the safe direction, but it can surprise people.

## How do you turn it on, and off?

Check you have version 2.1.323 or later (`claude --version` shows it, and `claude update` updates it). Then set an environment variable, a named setting the program reads on start, called `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` to 1. For one try, this single line does it on macOS, Linux and WSL:

`CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude`

Claude Code asks you to confirm before your first Code Mode session, then restarts. To turn it off, remove the variable or set it to 0, then start a new session.

Two points matter for teams. A project's own settings files cannot switch it on, so a repository you download cannot turn it on for you. And an organization can block it for everyone by setting the same variable to 0 in managed settings, the central settings an administrator controls. Administrators cannot switch it on for users that way.

## What should a team do now?

1. **Do nothing, if you use automation.** If your runs use `-p` mode, cloud sessions or usage-data export to a monitoring tool, Code Mode does not fit yet.
2. **Run one small trial.** Pick a repetitive, low-risk task in a throwaway branch. Compare the result, the time and the plan usage with a normal run.
3. **Have someone read the script once.** Use Ctrl+O. If nobody on your team can judge the code, treat the trial as a technical experiment, not a process.
4. **Decide on a policy.** If you do not want it used, blocking it is one setting in managed settings.

## How does Atlas handle this?

Atlas is a team of AI engineers built on Claude Code, and you talk to one project assistant, PA, in plain words. Today Atlas has no switch for Code Mode. Atlas does refuse to call work done until it is on the main branch or queued to land and the product's rules pass, and it shows what each task cost, so a trial could be judged by results. Code Mode support is coming to Atlas, built in, so it needs no setup. Until then, the route is to try it in your own Claude Code session on a small task, as above. You can read more about the team on the [Atlas home page](https://bridge-terminal.com/atlas/).

## Conclusion

Code Mode is a real change in how Claude Code works: one script instead of many separate requests. It is also experimental, limited to the terminal, and not suited to automated runs. Try it on one small job if you are curious, keep your rules and hooks in place, and wait for Anthropic to settle it before you build habits around it.

## Questions people ask

### What is Code Mode in Claude Code?

It is an experimental option, added in Claude Code 2.1.323 on 12 November 2026, where Claude writes a short JavaScript program that makes several tool calls in one step instead of asking for them one at a time. It is off by default and may change or be removed in any release.

### How do I turn on Claude Code Code Mode?

Update to version 2.1.323 or later, then set the CLAUDE_CODE_EXPERIMENTAL_CODE_MODE environment variable to 1, for example by starting claude with it set. Claude Code asks you to confirm before the first Code Mode session. Setting it to 0, or removing it, turns it off.

### Is Code Mode safe to use?

Each tool call the script makes still goes through your deny and ask rules and PreToolUse hooks. In auto mode, though, the safety checker reviews each piece of code, not each call, and cannot see values worked out while it runs. Keep rules or hooks for anything that must never happen.

### Does Code Mode work in automated runs or the VS Code panel?

No. Anthropic's documentation says it works only in an interactive terminal session. It does not work with -p mode, the Agent SDK, the VS Code panel, the Desktop app or cloud sessions.

### Will Code Mode make Claude Code cheaper or faster?

Anthropic's documentation does not say so. It describes Code Mode as useful for tasks with many related steps, so measure the effect on your own work before relying on it.

## About Atlas: Code Mode is not built into Atlas yet

Atlas has no Code Mode switch today. It does refuse to call work done until the product's rules pass, and it shows what each task costs. Code Mode support is coming to Atlas, built in, so it needs no setup. Until then, try it in your own Claude Code session. — https://bridge-terminal.com/atlas/

## Sources

- [Run tool calls from code with Code Mode (Claude Code docs)](https://code.claude.com/docs/en/code-mode)
- [Claude Code changelog](https://code.claude.com/docs/en/changelog)

_Researched and drafted with Claude, then checked against the sources above. Atlas is an independent product, not affiliated with Anthropic or OpenAI._

## Related

- [Claude Code Mods: What They Are and the Risks to Check](https://bridge-terminal.com/atlas/blog/claude-code-mods-what-they-are-risks/)
- [Who Owns AI-Written Code? A Plain Guide for Founders](https://bridge-terminal.com/atlas/blog/who-owns-ai-written-code-plain-guide/)
- [GPT-6.1 Terra in Codex: What Changed and Who Should Care](https://bridge-terminal.com/atlas/blog/gpt-6-1-terra-codex-what-changed/)
