What Code Mode does

Normally Claude Code requests each Bash, Read or Edit call one at a time and reads every result before deciding the next step. With Code Mode, Claude writes a single JavaScript program that can run commands in parallel, feed one result into the next call and return only the output the model needs to read.

In Anthropic's example, the code finds a file, changes a retry limit and runs the tests, all in one step.

How to turn it on

The feature is experimental and opt-in. It is enabled with the CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 environment variable or by adding the same variable to the env section of settings.json. Admins can block it org-wide with a value of 0, but cannot force it on.

Limits

  • It works only on the native build, in an interactive terminal session and on v2.1.323 or later. Windows requires Git for Windows.
  • It supports only the Anthropic API or a Claude subscription; Bedrock, Google Cloud, Foundry, the Agent SDK, VS Code and the desktop app are not supported.
  • Code Claude waits on stops after 10 minutes, while background code can run for up to 2 hours.
  • Anthropic publishes no benchmark or token-saving figure for Code Mode.

Visibility

The conversation shows tool calls and diffs, but the JavaScript itself is hidden by default. Press Ctrl+O to open the transcript viewer and expand a Code row.