Claude Code 2.1.323 Adds Code Mode

By Rogier Muller11.16.26
Claude Code 2.1.323 Adds Code Mode

2.1.323 puts Claude Code's sharpest change behind an opt-in: Code Mode lets Claude write JavaScript to call its tools, and @anthropic labels it experimental. For the reader, the useful part is the boundary: this release gives developers a new execution path to test without making it the default for every session.

The same changelog also tightens the boring parts that make a new execution path survivable. Plugin version ranges now affect whether a plugin is accepted, validation sees more plugin mistakes, and several runtime warnings name the thing that is wrong instead of leaving the user to infer it.

Code Mode is an opt-in execution experiment

Code Mode changes the control surface for tool use. Claude can express a tool sequence as JavaScript that calls its tools, which should make some multi-step work less dependent on chat-by-chat steering.

The limit matters as much as the feature. The changelog says Code Mode is experimental and opt-in, and it points to the docs for turning it on, or for turning it off for an organization. That is the right shape for a feature that can make tool use more powerful.

A safe first use is inspection. Ask Claude to read the repo shape, summarize how a plugin is wired, or explain where a hook boundary sits. Save edits for after a human reviewer has read the code in the transcript viewer.

Rolling this out in your team?

We train engineering teams on their own codebase in two days. Claude Code setup, shared rules and review included.

Plugin version ranges become real boundaries

2.1.323 adds engines["claude-code"] to plugin.json. A plugin outside its stated Claude Code version range is refused at installation, update, and load time, and install or update chooses the newest plugin version that fits.

That makes the version range part of the package contract. A plugin can now say which Claude Code versions it expects, and Claude Code uses that statement before the plugin runs.

For Team conventions, this belongs near the plugin itself rather than in a prose note that people forget to read. If a shared plugin depends on a new hook shape or a specific Code Mode behavior, plugin.json is the place to make the boundary visible.

Validation catches plugin mistakes earlier

claude plugin validate now type-checks a plugin's TypeScript hooks module. Each finding is a warning, and --strict turns those findings into failures.

The validator also lists the $ nouns a mod's engine.create hook adds, withholds, or replaces.

This is a Review habit in our methodology: use Claude to help build the plugin, then require a local validation pass before trusting the package. The command is small enough to make it part of the branch routine: claude plugin validate --strict.

Warnings got closer to the fault

The release adds a startup warning for Bash allow rules with a wildcard inside a variable value. The changelog gives Bash(PORT=* npm run dev) as the example, which is exactly the kind of permissive rule that can look harmless during setup and become vague later.

Long-running hooks also get a progress heartbeat every 30 seconds in claude -p and SDK sessions, once the host includes this version. That is a liveness signal. It helps a host such as Claude Desktop avoid treating the turn as hung while a hook is still running.

There are smaller rough-edge fixes with the same theme. A plugin language server warning now names the server and what to check. Perforce users get a one-time notice naming CLAUDE_CODE_PERFORCE_MODE when Perforce settings exist and the mode is off. If permission prompts are the current friction in a repo, the adjacent release note to read is Claude Code 2.1.325 Tightens Permission Prompts.

The release also adds .docx uploads for Artifact tool assets. The diff panel and usage-credit states get clearer UI cues, which matters when a session is otherwise doing heavy tool work.

What to try first in one repo

Use one repo with an existing Claude Code plugin or hook. Keep the exercise small enough that a failed experiment leaves no cleanup beyond a branch reset.

Step Action Pass condition
1 Confirm the local session is on Claude Code 2.1.323 before judging release behavior. The test is tied to the version that shipped these changes.
2 Enable Code Mode according to the official docs for one controlled session. You can also turn it off again through the documented control path.
3 Ask Claude to inspect plugin.json and explain the plugin boundary before making edits. The first Code Mode run produces an explanation, not a patch.
4 Add or check engines["claude-code"] in plugin.json if the repo owns a plugin. The plugin declares the Claude Code versions it expects.
5 Run claude plugin validate --strict. Type findings in hooks fail the check instead of sitting as warnings.
6 Review Bash allow rules for patterns like Bash(PORT=* npm run dev). Startup warnings are either gone or tied to an explicit decision.
7 If hooks run long in claude -p or an SDK session, watch for the 30-second heartbeat once the host includes this version. A slow hook looks alive instead of stuck.

Further reading

Keep the experiment narrow

Pick one repo, run the Code Mode inspection, and fix any claude plugin validate --strict findings before using the release for edit-heavy work.

Train your team on Claude Code

Two days on your team's own repository, onsite or remote, with a written proposal before you commit.

Book a call

Prefer to measure first? Take the free team check.