← In the News

Claude Code: a crashing hook in Code Mode no longer blocks the call

Claude Code v2.1.329 · Anthropic · GitHub release notes, November 19, 2026

Machine-readable Download Markdown

The release changes Code Mode "so a PreToolUse hook that errors no longer refuses a script's tool call, as outside Code Mode." Hooks that must stop the call when they fail now need "onFailure": "block" on the command, HTTP or MCP tool hook. The trust dialog now warns where a folder's hooks are declared, and Claude Desktop and other non-interactive hosts show a warning when hooks in managed settings fail to load.

The release also removes the automatic retry at the limit named in a max_tokens error that version 2.1.326 had added. Behind a gateway whose model takes fewer output tokens, the notes say to set CLAUDE_CODE_MAX_OUTPUT_TOKENS to that limit. And it fixes the Agent tool's effort parameter being ignored for named teammates in agent teams.

Why it matters: If you use a PreToolUse hook as a guard in Code Mode and it can crash, a crash now lets the call through unless you set "onFailure": "block". Check which of your hooks are meant to fail closed before you upgrade.