ToolsNews
Claude Code Code Mode: tool calls from JavaScript
Anthropic added an experimental Code Mode to Claude Code. Instead of requesting Bash, Read or Edit calls one by one, Claude writes a short JavaScript snippet that runs them, in parallel where possible, and returns only the output it needs.
· 3 min read

What is it?
Normally Claude Code reads the result of every tool call before deciding the next step. In Code Mode, Claude writes a piece of JavaScript and Claude Code runs it in your session (Claude Code Docs). One snippet can run commands in parallel, feed one result into the next call and return only the part of the output Claude needs to read.
In the docs example, raising a retry limit becomes a single snippet that finds the file with ripgrep, edits it and runs the tests. The conversation still shows the tool calls, such as the diff; press Ctrl+O to see the code in the transcript viewer.
What is it good for?
- The same change repeated across many files.
- Searches whose results need filtering before Claude reads them.
- Several independent commands that can run at the same time.
The gain shows up mostly in the context window: raw search and test output no longer lands in full, only the filtered part. Hugging Face's harness adapters attack the same cost of many small tool calls from another angle (Harness adapters: RL-tuned LoRAs lift Qwen3.8-27B agents).
How to turn it on
You need the native build of Claude Code v2.1.323 or later, a Claude subscription or Console account, and Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2. Start it in a terminal with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1; Claude Code asks for confirmation the first time. Project-level settings files are ignored for this variable, so a cloned repo cannot switch it on for you. Admins can block it with a value of 0 in managed settings.
Limits
- Experimental and off by default; it may change or be removed in any release.
- Not available through a gateway, Amazon Bedrock, Google Cloud or Microsoft Foundry, or in organizations with HIPAA or zero data retention configurations.
- Interactive terminal sessions only; no VS Code panel, Desktop app or cloud sessions.
- In auto mode the classifier reviews the code, not each tool call. Code stops after ten minutes.
- A Code Mode session can only be resumed with Code Mode on.
Why it matters
This is the pattern agent builders have been wiring up by hand for a while: let the model write code to orchestrate tools instead of calling them step by step. If you do lots of repetitive refactors in a large repo, it is worth a try. On the security side, note that an auto mode approval now covers a whole script, not a single command.
Produced with the help of AI, reviewed by an editor. How we make our articles
Reviewed and edited by the Neural Daily desk. About


