Skip to content
AI EmployeeSuper-AgentsAgent-to-AgentBenchmarksPricingBlog

Claude Code Mode: Many Tool Calls in One Script

At a glanceQuick answers
What is Claude Code Mode?
An experimental way for Claude Code to use tools: Claude writes JavaScript that makes several tool calls in one step, and Claude Code runs it in your session.
How do I turn it on?
Set CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in your shell or user settings, on Claude Code v2.1.323 or later, and confirm the prompt at the first start.
Is it safe?
Each tool call still goes through your deny and ask rules and hooks. In auto mode the classifier reviews the code as a whole and cannot see values computed at run time.
Editorial illustration on a near-white ground: the words Code Mode and 1 step above four grey tool cards in a row with arrows, then a dark code card with curly braces from which an orange ribbon carries the same four tool icons together.
Fig 0Without Code Mode, one tool call at a time; with it, one script. Made by CellCog's image agent, running GPT Image 2.6.

Anthropic has given Claude Code a new way to use its tools: write a script. In Code Mode, announced on November 17, 2026, Claude writes a piece of JavaScript that makes several tool calls, and Claude Code runs it in your session, instead of Claude asking for one call, reading the result and deciding the next.

The Claude developer account posted it at 21:18 UTC: “Check out Code Mode, a new, experimental way for Claude Code to work with tools.” The same post says it can answer you while long commands are still running, which matters for long builds. By 08:06 UTC on November 18 the post had 785,435 views on X. This page is read from Anthropic’s Code Mode documentation and that post. The docs are plain about its status: “Code Mode is experimental and off by default. It may change or be removed in any release.”

On this page · 7 sectionsOpen
  1. What changes
  2. What you need
  3. Permissions: what still checks each call
  4. How long a script can run
  5. What it does not do yet
  6. Where CellCog sits
  7. Sources
Key points6 · 6 min full read
  1. Curly braces with an orange chain link between them.
    Code Mode lets Claude Code write one piece of JavaScript that makes several tool calls, instead of asking for each call and reading each result in turn.
  2. A switch in the off position beside an orange dot.
    Anthropic announced it on November 17, 2026. It is experimental and off by default; you turn it on with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1.
  3. A checklist with the first item ticked in orange.
    It needs 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.
  4. A shield with an orange check mark.
    Every tool call inside the script still meets your deny and ask rules and your PreToolUse hooks; in auto mode the classifier reviews the script, not each call.
  5. A stopwatch with one orange segment.
    A script you wait on stops after ten minutes; in auto or bypassPermissions mode it can run in the background for up to two hours while you keep talking.
  6. An office building with an orange padlock on the door.
    It works only in an interactive terminal session, not through Bedrock, gateways, the Agent SDK or the Desktop app; administrators can block it for a whole organization.

§ 01What changes

The documentation’s own example raises a retry limit. One script finds the file with a search, edits it, runs the tests and returns the file path and the test output to Claude. Without Code Mode, that is three or four separate tool calls, each with a round trip through the model.

You still see the tool calls in the conversation, such as an edit’s diff. The code itself sits in the transcript viewer behind Ctrl+O, as a collapsed Code row.

Anthropic suggests it for three kinds of work:

  • a change that repeats across many files,
  • a search whose results need filtering before Claude reads them,
  • several independent commands that can run at the same time.
Animation: a dark cube walks to four tool stations one at a time along a dashed path; then a script card sends one orange track to all four stations, opening a teal permission gate at each
Fig 1One call at a time, or one script that reaches every tool, each call still checked

§ 02What you need

Requirement Detail
Version Claude Code v2.1.323 or later (v2.1.326 for agent teams)
Account A Claude subscription or Console account
Models Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2
Surface An interactive claude session in a terminal, native build
Not available Gateways, Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, Microsoft Foundry
Not available The -p flag, the Agent SDK, the VS Code panel, the Desktop app, cloud sessions
Organizations Not on the HIPAA configuration or zero data retention
Settings that stop it An API key helper, OpenTelemetry export, DISABLE_TELEMETRY
Table 1Requirements for Claude Code Mode, from Anthropic’s documentation

To try it, set CLAUDE_CODE_EXPERIMENTAL_CODE_MODE to 1 in your shell or in ~/.claude/settings.json and start claude. Claude Code asks you to confirm once, restarts, and shows a line near the top saying Code Mode is on. A session started in Code Mode can only be resumed with Code Mode on. Claude Code ignores the variable in a project’s settings files, so a repository you clone cannot switch it on for you.

§ 03Permissions: what still checks each call

Each tool call inside a script still goes through your deny and ask permission rules and your PreToolUse hooks, under the tool’s usual name. The difference is in auto mode: the classifier reviews each piece of code before it runs, not each tool call. Anthropic’s warning: “It doesn’t see values computed at run time, such as a path taken from search output, so keep rules or hooks for calls you must control.”

Two practical notes from the docs. A hook that allows or blocks shell commands should check every part of a command, because a call can arrive joined to a cd. And a hook that wants to read the code itself can match REPL, the tool that runs the code. An administrator can set the variable to 0 in managed settings so that nobody in the organization can use Code Mode.

§ 04How long a script can run

How the script runs Limit Can you keep talking?
Claude waits for it 10 minutes, including time at permission prompts No
In the background (auto or bypassPermissions mode) 2 hours Yes
Table 2Run-time limits for a Code Mode script, from Anthropic’s documentation
Longest a Code Mode script can run, in minutes, per Anthropic's docsBar chart: a script Claude waits on stops at 10 minutes; a background script, highlighted, can run 120 minutesClaude waits10Background120Longest a Code Mode script can run, in minutes, per Anthropic's docsBar chart: a script Claude waits on stops at 10 minutes; a background script, highlighted, can run 120 minutesClaude waits10Background120
Fig 2Longest a Code Mode script can run, in minutes, per Anthropic's docs

§ 05What it does not do yet

  • Resume elsewhere. A Code Mode session resumes only in the terminal, with Code Mode on, and cannot move to the Desktop app or become a background session.
  • Other features. Remote Control, Claude in Chrome and computer use do not work in a Code Mode session.
  • Every account. Some accounts see a message that it is not open to them yet; the docs say to update, then try again another day.

§ 06Where CellCog sits

Our conflict, declared: CellCog builds AI employees that also write code, and we run them on our own agent system, not on Claude Code, so Code Mode changes nothing inside CellCog. What it shows is a direction we agree with: an agent that plans several steps at once and reports back only what matters gets more done per turn, and the permission question moves from each call to the plan as a whole.

§ 07Sources

Frequently asked5 questions

Q1What does Claude Code Mode do?

Without it, Claude asks for one tool call at a time and reads each result. With it, Claude writes JavaScript that can run commands in parallel, feed one result into the next call, and return only the part of the output it needs.

Q2Which models and versions support Code Mode?

Claude Code v2.1.323 or later, with Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2, on a Claude subscription or Console account. Agent teams need v2.1.326 or later.

Q3Where does Code Mode not work?

Through a gateway, Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform or Microsoft Foundry; with -p, the Agent SDK, the VS Code panel, the Desktop app or cloud sessions; and in organizations on the HIPAA configuration or zero data retention.

Q4Can a cloned repository turn Code Mode on for me?

No. Claude Code ignores the variable in a project’s settings files, so only your shell or user settings turn it on. Administrators can set it to 0 in managed settings to block it.

Q5How long can a Code Mode script run?

If Claude waits for it, ten minutes, including time at permission prompts. In auto or bypassPermissions mode it can run in the background for up to two hours.

Published 18 November 2026 All Trust, permissions & security →