minssam.
Published on

Claude Code "Code Mode": Claude Now Calls Tools Directly in JavaScript

Amid fierce competition among AI coding tools in November 2026, Anthropic released a quiet but significant update. The feature is Code Mode, which arrived in Claude Code v2.1.323.

At first glance, "a code mode added to a coding tool" might not sound groundbreaking. But once you understand what it actually does, the picture changes.


What It Means to "Use a Tool" Has Changed

Think about how AI agents have traditionally called tools β€” web search, file reading, code execution, and so on. Most frameworks worked by having the AI decide which tool to use, then submit a request in a structured format like JSON. Like an employee filling out a form.

Code Mode is different. Claude writes JavaScript code directly to call tools. Instead of filling out a form, it writes a script.

Why does this matter? Calling tools through code means:

  • Repetitive tasks can be handled in loops
  • Different tools can be selected based on conditions
  • Results from multiple tools can be combined and passed to the next step

It's like a human writing a script to automate a workflow β€” except now Claude writes and runs that script itself.


v2.1.326: Expanded to Agent Teams

After Code Mode debuted in v2.1.323, v2.1.326 extended it to agent teams. Not just a single Claude working alone, but multiple Claude agents collaborating β€” all with Code Mode enabled.

Alongside this:

  • Strengthened sandbox protections: Four permission and sandbox security gaps were patched
  • Faster responses: Code-based tool calls process more quickly than JSON-based ones
  • Remote Control streaming: Real-time monitoring of agent tasks from a remote environment

The security patches are especially important. Code Mode is powerful, and Anthropic also gave organization admins the option to disable it entirely.


What "Experimental (Opt-In)" Means

Code Mode is currently an opt-in experimental feature β€” not enabled by default; users must activate it manually.

This signals Anthropic is proceeding carefully. Having AI write JavaScript to execute tools is powerful, but it also creates room for unexpected behavior or security concerns.

From an edtech perspective, this opens interesting possibilities for learning platform automation β€” having AI directly handle the work of analyzing learning data, generating personalized content, and integrating with external services, in a programmatic way.


Other Notable Changes

A few other changes from this update are worth noting:

Auto mode adjustment: Auto mode no longer falls back to the built-in internal classifier. When telemetry or feature flags are off, it asks the user or denies the action.

Idle Compaction: Added to VS Code and the desktop app''s Code tab. It cleans up old context to use memory more efficiently.

Fable 5.2 as default model: Claude Fable 5.2 (claude-fable-5-2) is now the default for the Fable model family, supporting a 1M token context window.


Practical Tips

If you''re using or watching Code Mode, here are some directions to consider:

  1. Apply it to repetitive file processing: Looping through multiple files in sequence becomes straightforward.
  2. Conditional tool selection: "Try tool A, and fall back to tool B if it fails" β€” Claude can now handle that logic itself.
  3. Check security settings: For organizational use, verify Code Mode permissions in the admin panel before enabling.
  4. Remember it''s experimental: Since it''s still opt-in, thorough testing is recommended before using it in production.

AI tools are moving beyond "answering faster" toward AI that designs its own workflows programmatically. Code Mode is the clearest signal yet of that direction.


Sources:

Claude Code "Code Mode": Claude Now Calls Tools Directly in JavaScript | MINSSAM.COM