Claude Code's new Code Mode: check your permission setup first
SummaryCode Mode has Claude write JavaScript that makes several tool calls in one step. Per Anthropic's docs, auto mode's classifier then reviews the script, not each call. Here is what to keep in rules and hooks.
· MODEL Editors · 3 min read
Some links may be affiliate links. Disclosure

Batching tool calls is fine. Just know what your safety check is actually reading.
Claude Code v2.1.323, released Nov. 12, 2026, added Code Mode, an experimental, opt-in feature (changelog (opens in a new tab)). Without it, Claude asks for tool calls such as Bash, Read or Edit one at a time and reads each result before deciding what to do next. With it, Claude writes a piece of JavaScript that makes the tool calls, and Claude Code runs that code in your session. One script can run commands in parallel, feed one result into the next call, and return only the output Claude needs (Anthropic docs (opens in a new tab)). It has been a busy topic among developers on X this weekend.
What changes for permissions. Per Anthropic's Code Mode page:
- In auto mode, the classifier reviews each piece of code before it runs, not each tool call. The docs say 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."
- Every tool call the code makes still goes through your
denyandaskpermission rules and yourPreToolUsehooks. You don't need to change a rule or matcher for a tool such asBash. - In the other permission modes, the code starts without a review and you're prompted for each tool call that would prompt you in that mode.
- To check the script itself, write a
PreToolUsehook that matchesREPL, the tool that runs Claude's code, and read the JavaScript fromtool_input.code. - The docs also warn that Bash rules match command text, so a denied command can run in a form the rule doesn't match, with or without Code Mode. For limits that don't depend on command text, they point to sandboxing.
Limits to know before you turn it on.
- Unless code can run in the background, you wait for it, and it stops after ten minutes, including time you spend at permission prompts. Background code (started in auto or
bypassPermissionsmode) can run for up to two hours. - Interactive terminal sessions only: no
-p, Agent SDK, VS Code panel, Desktop app or cloud sessions. No Remote Control, Claude in Chrome or computer use. - You need a Claude subscription or Console account on the Anthropic API (not a gateway, Bedrock, Google Cloud or Foundry), the native build, and Opus 5.5, Sonnet 5.5, Haiku 5.5 or Fable 5.2.
- A Code Mode session can be resumed only in the terminal with Code Mode still on.
- It is experimental, off by default, and "may change or be removed in any release."
How to try it. Update to v2.1.323 or later, then start a session with:
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude
Confirm the prompt, then press Ctrl+O to open the transcript viewer and expand a Code row to read what Claude wrote. Claude Code ignores this variable in a project's settings files, so a repository you clone can't switch Code Mode on for you. Admins can block it by setting the variable to 0 in managed settings.
One version note: as of 11:30 a.m. PT on Nov. 15, npm's stable tag for @anthropic-ai/claude-code was still 2.1.311 and latest was 2.1.325. The docs say stable-channel users who can't reach v2.1.323 should wait for stable to catch up or switch to latest.
Our take. Keep anything you must control in deny rules, PreToolUse hooks or a sandbox, where every call gets checked. Don't rely on a classifier's read of a script to catch a path it can't see until run time.
From Anthropic's documentation. MODEL has not run Code Mode for this story. Not sponsored. -- MODEL Editors
Get three tested tools every Friday
Free, weekly. Unsubscribe anytime.
Sources
- Run tool calls from code with Code Mode
Anthropic (Claude Code docs)
- Claude Code changelog (2.1.323)
Anthropic
- @anthropic-ai/claude-code on npm
npm
Keep reading

Hot take
Google caught a fully automated AI attack. It didn't need a zero-day. It read the patch.
Google's latest AI Threat Tracker describes exploit_agent, a multi-agent system that diffs web software before and after each patch, drafts an exploit and runs it with no human in the loop. The same report counts hundreds of AI-written exploits that don't work. Our take: sloppy AI code now hits defenders from both sides.
· MODEL Editors

Hugging Face x OpenRouter
Hugging Face now routes its LLM calls through OpenRouter
Hugging Face switched Inference Providers from its own router to OpenRouter's. Same token, same API, a provider picked per request, and retries when one fails. One breaking change: your own provider keys no longer work for chat models. Not tested by MODEL.
· MODEL Editors

Builder tip
Amazon caught AI agents hunting exposed LLM gateways for API keys. Lock yours down.
Amazon's decoy sensors captured attacker AI agents' own campaign records: they scanned for exposed LiteLLM, One API, Dify and similar apps, pulled the provider keys inside, and used stolen keys to pay for more hunting. Every technique was old. Here's the checklist.
· MODEL Editors

xeet
xeet renders X posts to PNG without a browser
Guillermo Rauch's new open-source tool rebuilds X's post layout in Rust and WebAssembly, so apps, agents and CI jobs can preview a post as an image in milliseconds instead of screenshotting headless Chrome. Not tested by MODEL.
· MODEL Editors
FREE · EVERY WEEK
The top AI tools this week, tested.
Every week MODEL's editors pick the AI tools worth your time, try them hands-on, and tell you what's good, what's not, and who it's for. Free, in your inbox.
Free. Unsubscribe anytime. Our picks are editorial and can't be bought.