BetaNov 12, 2026

Code Mode trims tool output

In Claude Code, Claude can now write JavaScript that calls your tools, including MCP tools, and reads back only what it needs, as an experimental opt-in.

Department
Engineering
Related links
Share

Claude Code now has Code Mode, an experimental opt-in in which Claude writes JavaScript that makes several tool calls in one step. Without Code Mode, Claude requests tool calls such as Bash, Read, or Edit directly and reads each result before deciding what to do next.

The code can call MCP tools, use one result in the next call, and return only the part Claude needs to read. Ask how many messages are in a Slack thread, and Claude gets back a number instead of the whole thread. You still see the tool calls, and Ctrl+O shows the code.

Code Mode is off by default and may change or be removed in any release. It works in interactive terminal sessions with a Claude subscription or Claude Console account, on Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5, or Claude Fable 5.2.

It isn't available through cloud providers or gateways, or for organizations that use the HIPAA configuration or zero data retention. To try it, set

CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1

and run claude on version 2.1.323 or later. The Code Mode docs list other requirements.

Earlier updates

Nov 10, 2026
All updates