Claude Code adds Code Mode: fewer tool calls, fewer tokens and more speed
Claude Code adds Code Mode, an experimental mode that you turn on with a flag. The idea is not new. Cloudflare coined it a little more than a year ago, during the MCP boom. Codex and Pi already have it. Rafa explains it in the Paint section.
The problem is the number of tool calls. Imagine that the agent must buy something on a website. It opens the page and gets the HTML. Then it clicks a link and gets the HTML again. Then it fills in one field, and another. Each step is a tool call, and each tool call costs tokens. The same thing happens in the file system when the agent reads and writes files one at a time.
With Code Mode, the agent asks for the HTML once. Then it writes a JavaScript file with all the actions: click, fill in this field, fill in the next one. From JavaScript, it can call the same tools. So six requests become two. Inside, one call can do 5, 8 or 30 operations.
The benefit is double. You save tokens, because the calls are grouped. And the agent is faster, mainly with browser use: it is faster to fill in five fields at once than one at a time. For Rafa, the name is bad, but the mode is the future. Pablo notes that Anthropic changes something as basic as the tool calling flow, and he thinks that internal evaluations support it. Watch in the video.

All the news we covered