Claude Code can now write one script that makes many tool calls at once
In Code Mode, an experimental setting that is off by default, Claude writes a short JavaScript program that makes its tool calls, and Claude Code runs it in the session. One program can run commands in parallel, feed one result into the next call and return only the part of the output Claude needs to read.
A coding agent normally works one tool call at a time. Claude asks for a Bash command, a file read or an edit, reads the full result, and only then decides on the next step. A task that touches many files repeats that loop many times, and every result, needed or not, lands in the conversation.
The Code Mode page in the Claude Code docs shows the other way. Asked to raise a retry limit, Claude might write four lines that search for the file, edit it, run the tests and hand back only the file name and the test output. The conversation still shows the tool calls, such as the edit's diff; the code itself appears as a collapsed Code row in the transcript viewer, opened with Ctrl+O. The docs suggest it for changes that repeat across many files, searches whose results need filtering first, and independent commands that can run at the same time.
Permissions work as before for each call: every tool call inside the code passes the deny and ask rules and the PreToolUse hooks under its usual name, such as Bash. In auto mode, though, the classifier reviews each piece of code before it runs, not each call, and it does not see values worked out at run time, such as a path taken from search output. The docs point out that a git push in a folder named app can reach a hook as cd 'app' && git push, so hooks should check each part of a command, and a hook can read the code itself by matching the tool named REPL. Code that Claude waits on stops after ten minutes; code running in the background, possible in auto or bypassPermissions mode, can run for up to two hours.
The requirements are narrow. Code Mode needs Claude Code v2.1.323 or later in its native build, an interactive terminal session, a Claude subscription or Console account and Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2. It does not work through gateways or cloud providers such as Amazon Bedrock, with HIPAA or zero data retention setups, with -p, the Agent SDK, the VS Code panel, the desktop app or cloud sessions, and a Code Mode session cannot use Remote Control, Claude in Chrome or computer use. It is turned on with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in the shell or user settings; project settings are ignored, so a cloned repository cannot turn it on, and an organization can block it with the value 0 in managed settings.
