Claude Code v2.1.323: Code Mode, hook heartbeats, background sign-in fixes#

Published by

Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog

Claude Code 2.1.323 documents Code Mode, an experimental opt-in where Claude writes JavaScript to call its tools.[1] Since the 2.1.321 build it also adds a 30-second progress heartbeat for long-running hooks in claude -p and SDK sessions, lets a program that launches Claude Code set its own resume command, and stops a background session from continuing under the wrong sign-in.[1]

Code Mode runs Claude's JavaScript through a vetted engine#

Code Mode is an experimental opt-in in which Claude writes JavaScript to call its tools; the changelog points to the Code Mode docs to turn it on, or to turn it off for an organization.[1][2] The opt-in is carried by CLAUDE_CODE_EXPERIMENTAL_CODE_MODE, a gate that has been in the build since v2.1.318 (2026-11-03); 2.1.323 is the release that documents it. Requirements, the org block and fixes for a mode that won't start are in the Code Mode guide.

The JavaScript runs through a REPL tool whose engine must pass a check: when it fails, the tool reports that the engine under Claude Code failed Code Mode's engine check and points to the repository's pinned Bun (node_modules/.bin/bun) or a staff build. Before the code runs, an auto-mode step checks it, and declines to run code it cannot check, such as code containing \uXXXX escapes, or code whose tool call a hook rewrote after Claude wrote it. In those cases the code is not run and the response says so.

Hooks report progress while they run long#

A progress heartbeat now fires every 30 seconds while hooks run long in claude -p and SDK sessions, so a host such as Claude Desktop does not treat the turn as hung once it includes this version.[1] The changelog also documents CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES (set to 1 to turn off subagent progress summaries and the requests that write them); that variable has been in the build since v2.1.318.[1]

New environment variables#

VariableWhat It Does
CLAUDE_CODE_HOOK_HEARTBEAT_INTERVAL_MSSets the interval of the hook progress heartbeat. While a hook runs long in claude -p or an SDK session, Claude Code emits a progress beat on this interval so the host does not treat the turn as hung. The changelog describes the heartbeat as every 30 seconds.
CLAUDE_CODE_RESUME_HINT_COMMANDA program that launches Claude Code sets this to its own resume command. The session's exit hint then names that command on its "Resume this session with:" line.

Plugins declare the Claude Code versions they run on#

plugin.json gains an engines["claude-code"] field: a plugin outside its stated Claude Code version range is not installed, updated or loaded, and install and update pick the newest version that fits.[1] claude plugin validate now type-checks a plugin's TypeScript hooks module, reporting each finding as a warning that --strict turns into a failure, and lists the $ nouns a mod's engine.create hook adds, withholds or replaces.[1] claude plugin install --json adds unsetOptionCount, the number of userConfig options not yet set.[1] Artifact tool asset uploads accept .docx files.[1]

Background sessions stop before borrowing another sign-in#

A batch of fixes keeps a session's credentials with that session. A background session whose named Anthropic profile is missing, changed or overridden now stops and says so; the same holds for a session on an API key, auth token or workload identity moved to the background.[1] A background session's sign-in now clears the previous account's login and other credentials for every session on the computer, and /fork, the Left arrow and --bg keep a named-profile session on its own sign-in.[1]

Several Bash permission-prompt gaps close in the same build: lsof commands that ran without a prompt, an rm judged from the wrong folder that skipped the dangerous-removal prompt, and allow rules with an attached wildcard such as Bash(ls*) that skipped the prompt all now ask.[1] --permission-mode auto or a defaultMode: auto setting now starts in Manual mode, which asks first, when auto mode is unavailable.[1]

What now stops to ask, or stops entirely#

Code Mode's auto-mode check, the closed Bash permission-prompt gaps, and the background sign-in fixes all move the same line: the point at which Claude Code will run code, or send a conversation, without the right gate. For anyone driving Claude Code non-interactively, through the SDK, claude -p, a background launch or Remote Control, this changes the failure shape. A background session that cannot hold its own sign-in now halts and reports it, and an auto permission mode with no auto backend starts in Manual, which asks first. A pipeline that relied on any of those paths continuing silently will now meet a prompt or a stop, so it is worth checking which of your automated runs depended on the old behavior.

This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners.

Sources#

  1. Claude Code Official Changelog, v2.1.323 release notes
  2. Code Mode documentation

Previous Claude Code analysis: v2.1.321 (November 9, 2026)

Next Claude Code analysis: v2.1.324 (November 15, 2026)

All 90 Claude Code analyses: Claude Code Version Tracker · Official Claude Code changelog

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy