Anthropic has added Code Mode to Claude Code as an experimental, opt-in feature. Claude Code Code Mode is a mode in which Claude writes JavaScript that makes several tool calls in 1 step. It shipped in Claude Code v2.1.323 last week. For developers, it changes how the agent spends round-trips on multi-step work. You can check the deployment options and specs here through our GPULeaderboard.com chrome extension.
TL;DR
- Works with: It works with Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2.
- Runs on: An interactive terminal session on the native build, v2.1.323 or later. Windows needs Git for Windows. Anthropic API or Claude subscription only.
- Performance: Anthropic publishes no benchmark or token-saving figure for Code Mode.
- Best: Background code can run for up to 2 hours while you keep talking to Claude.
- Worst: Code that Claude waits on stops after 10 minutes. No Bedrock, Google Cloud, Foundry,
-p, Agent SDK, VS Code or Desktop. - Bottom line: Best: related tool calls run as 1 program. Worst: narrow availability and coarser auto-mode review.
What is Code Mode in Claude Code?
Without Code Mode, Claude requests each Bash, Read or Edit call directly. It reads every result before choosing the next step. With Code Mode, Claude writes a piece of JavaScript, and Claude Code runs it in your session.
According to the docs, one piece of code can run commands in parallel. It can feed one result into the next call. It can also return only the output Claude needs to read.
Anthropic’s example raises a retry limit. The code finds the file, edits it and runs the tests:
const files = await $`rg -l "function retryPolicy" src`.text();
const target = files.trim().split("\n")[0];
await edit(target, "maxAttempts: 3", "maxAttempts: 5");
({ edited: target, tests: $`npm test -- retryPolicy`.nothrow() });In the conversation, you see the tool calls, such as the diff. You do not see the code by default. Press Ctrl+O to open the transcript viewer and expand a collapsed Code row.
