AIToday
Large Language ModelsAI Coding AssistantsAI Safety & AlignmentZenn AI/MLPublished: Dec 4, 2026, 10:01 JST

Claude Code adds experimental Code Mode in v2.1.323

Send on LINE
Claude Code adds experimental Code Mode in v2.1.323

3 Key Points

  1. What happened

    Claude Code v2.1.323 (2026-11-12) added Code Mode as an experimental, off-by-default feature enabled with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1; Claude writes JavaScript calling Bash, Read and Edit and runs it in one pass.

  2. Why it matters

    Anthropic's docs say the auto-mode classifier reviews the code as a whole and cannot see values computed at runtime, so operations you must always stop need deny/ask rules or hooks rather than classifier review.

WHO IT HITSDevelopers and platform teams running Claude Code in terminal sessions need to re-check their permission rules and PreToolUse hooks before turning it on, especially anyone who relies on the sandbox or on shell-command hooks to block risky actions.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

Code Mode changes what Claude Code actually sends to the model. Instead of a request-and-read loop for each Bash, Read or Edit call, Claude writes a single JavaScript program, and Claude Code runs it inside the session. Anthropic's own example searches for files, edits one, runs tests and returns only the edited filename and test result to Claude. Because the model no longer round-trips for every small operation, the feature is aimed at work with many small steps: the same change across many files, searches whose output should be narrowed before Claude reads it, and independent commands that can run in parallel. Changelog entries such as the v2.1.328 note on shortening Code Mode tool descriptions to improve token usage point the same way.

The conditions are narrow. Besides the four supported models, Code Mode is limited to terminal interactive sessions, and a session begun in Code Mode can only be resumed with Code Mode on. Remote Control, Claude in Chrome and computer use are unavailable inside it, and moving to the desktop app or running as a background session is not possible. The rollout has also been moving fast: agent teams, tool-call hooking mods and OpenTelemetry events and metrics gained support in v2.1.326, v2.1.327 and v2.1.329 respectively, while OpenTelemetry tracing remains incompatible on any version.

The permission model is the part that shifts most. The docs state that the auto-mode classifier reviews each piece of code before execution and does not see values computed at runtime, such as a path pulled from search results. That is why operations that must always be stopped are pushed onto deny/ask rules or hooks. PreToolUse hooks may receive compound commands like cd 'app' && git push, which hooks checking command.startsWith("git push") would miss. The sandbox applies to shell commands only; JavaScript itself and the file, web and MCP tool calls it makes run outside it, so full isolation would mean running Claude Code in a container or VM. Output inspection moves to a PostToolUse hook on REPL, since from v2.1.328 UserPromptSubmit hooks no longer receive code output. Given the author's own note that the docs say the feature may change or disappear in any release, keeping normal sessions off and switching it on only for bulk changes looks like a reasonable stance for now.

FAQ
Which models and setups can use Code Mode?
It works only with Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2, in terminal interactive sessions. VS Code panels, the desktop app, cloud sessions, gateway setups, Claude for Government, HIPAA and zero-data-retention configurations are excluded.
Can a project's settings file turn Code Mode on?
No. Settings written in a project's settings file are ignored, so a cloned repository cannot enable it. You enable it with the environment variable or in ~/.claude/settings.json, and managed settings can only force it off with a value of "0".
How long can Code Mode code run?
If Claude waits, the code stops at 10 minutes, and from v2.1.328 the time spent waiting on permission prompts is not counted. In the background it can run up to 2 hours in sessions started in auto mode or bypassPermissions mode.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next articleOpenRouter finds AI accuracy drops to 27% as sessions lengthen