Codemode in Claude Code news update news update
Anthropic launched experimental Code Mode in Claude Code v2.1.323, letting the assistant execute multi-step JavaScript scripts directly inside local terminals.
By Dillip Chowdary • Nov 15, 2026 • Source: code.claude.com
In this post
Anthropic released an experimental feature named Code Mode for Claude Code v2.1.323 that changes how the assistant executes tool calls. Instead of requesting separate operations like Bash, Read, or Edit and waiting for individual results, Claude writes a JavaScript program to execute those calls directly in your session, as detailed in code.claude.com's report. The update targets developers managing multi-file changes and concurrent terminal workflows.
This article covers the technical architecture, runtime requirements, configuration commands, timeout boundaries, and permission models governing Code Mode. It is intended for software engineers and systems architects evaluating programmatic tool execution in developer environments. Readers will learn how the system evaluates script safety, handles background tasks, and isolates execution.
01JavaScript execution inside terminal sessions
Without Code Mode, Claude pauses after every command, requiring sequential round trips to process file outputs before deciding the next operational step. Code Mode replaces that back-and-forth mechanism by allowing Claude to generate a JavaScript program that Claude Code evaluates directly within the local developer session. The resulting script runs tools programmatically, feeds output from one utility into the next, and returns only the filtered text the model needs.
Developers observe standard tool outputs such as unified file diffs rather than the raw generated program code in the default terminal conversation view. Users who want to inspect the generated JavaScript can press Ctrl+O to open the interactive transcript viewer. Each piece of code appears in that viewer as a collapsed Code row with an expansion hint, and pressing Ctrl+O again returns to the ongoing conversation.
02Tool calling workflow and runtime limits
The transition to script-driven tool calling alters how commands are scheduled and evaluated across active developer sessions. Rather than executing isolated operations that prompt for approval at every stage, Code Mode bundles multi-step interactions into a single program. The following comparison highlights key operational specifications between standard tool invocations and Code Mode execution.

| Feature | Standard Tool Calls | Code Mode JavaScript Execution |
|---|---|---|
| Execution Paradigm | Step-by-step tool invocation | Programmatic JavaScript via REPL |
| Supported Models | Standard catalog | Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 |
| Minimum Version | Legacy versions | Claude Code v2.1.323 or later |
| Foreground Timeout | Interactive waits | Ten minutes maximum wait |
| Background Timeout | Unavailable | Up to two hours in auto mode |
When long-running commands like software builds or test suites run, Claude either waits for completion or lets them proceed in the background. In waiting mode, execution halts automatically after ten minutes, including time spent answering permission prompts. Background tasks can run for up to two hours when started under auto or bypassPermissions modes.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Multi-file filtering and parallel command batches
Code Mode delivers significant efficiency improvements when applied to tasks requiring multiple related tool calls across large codebases. A single generated script can execute searches, trim results, apply string replacements, and trigger test runners without prompting for intermediate decisions. For example, updating a retry limit across files occurs in one pass rather than through repetitive manual confirmations.
Several independent terminal commands can execute concurrently through standard asynchronous patterns, reducing wall-clock waiting time for complex project audits. Scripts filter large directory search outputs before returning data, which eliminates unnecessary context consumption and preserves model context space. This structure makes Code Mode effective for repository-wide updates, multi-file refactoring, and targeted file searches.
04Environment variable toggles and configuration commands
Activating Code Mode requires Claude Code v2.1.323 or later and setting the experimental environment variable before launching the interactive terminal client. Developers on older builds should update their global client or switch release channels to meet the prerequisite version threshold. Once updated, launching the executable with the variable enabled initiates the script execution engine.
claude update
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude
/model fable
claude --model fableTo enable Code Mode permanently across future terminal sessions, save the environment variable inside the ~/.claude/settings.json file. Project-level configuration files cannot enable Code Mode, ensuring cloned repositories cannot force script execution without explicit developer consent. Supported models like Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable 5.2 can be selected at runtime or pinned at startup.
05Permission hooks and operational runtime boundaries
Code Mode enforces strict operational boundaries to safeguard developer environments during automated script execution. In auto permission mode, an automated classifier reviews the entire generated JavaScript program before execution begins rather than evaluating individual tool calls. Because the classifier cannot predict dynamic runtime values like paths extracted from search output, developers should keep explicit deny rules and PreToolUse hooks.
Organizations can block Code Mode across all managed developer machines by setting CLAUDE_CODE_EXPERIMENTAL_CODE_MODE to 0 in managed settings. The feature remains unavailable on Amazon Bedrock, Google Cloud Agent Platform, Microsoft Foundry, and environments requiring HIPAA compliance or zero data retention. Sessions running Code Mode cannot transfer to the Desktop application or run alongside cloud sessions.
Codemode in Claude Code news update news FAQ
What models and client versions support Code Mode?
Code Mode requires Claude Code v2.1.323 or later paired with Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable 5.2.
How does Code Mode handle process timeouts?
Foreground scripts wait up to ten minutes before timing out, including interactive prompts. Background execution in auto mode can run for up to two hours.
Can Code Mode be enabled through repository settings?
No, Claude Code ignores the experimental variable in project-level settings to prevent cloned repositories from enabling script execution.
How do developers inspect the code generated by Claude?
Users can press Ctrl+O during a session to open the transcript viewer, which displays generated scripts in collapsed Code rows.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement