Anthropic adds experimental JavaScript Code Mode to Claude Code
Anthropic has introduced Code Mode as an experimental, opt-in feature in Claude Code. Available from version v2.1.323, it lets Claude write JavaScript that combines calls to built-in tools such as Bash, Read and Edit. A single program can run commands in parallel, pass one result to another call and return only selected output. Anthropic has not published a token-saving or benchmark figure for this feature.
The mode is intended for tasks involving many related operations, including repeated changes across files, searches that require filtering, and independent commands that can run simultaneously. Developers can enable it by setting CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in the shell or Claude settings, then confirming the prompt. A setting of 0 disables it, and administrators can block use across an organization but cannot enable it remotely.
Code Mode runs in an interactive native terminal session and requires a Claude subscription or Console account. It is unavailable through Bedrock, Google Cloud, Microsoft Foundry, VS Code, Desktop, cloud sessions and the Agent SDK. Code that Claude waits for stops after 10 minutes; background execution can continue for up to two hours while the conversation continues. Permission rules and PreToolUse hooks still apply, although Auto mode reviews code blocks rather than individual tool calls.
Written by Sakhanda Wire AI from reporting by MarkTechPost. Facts, quotes and full context are in the original article below.