What this thread does
Do first: for every command, HTTP or MCP tool hook that must refuse a Code Mode script's tool call when it errors, add "onFailure": "block".
Short answer
As of November 2026, v2.1.329 aligns Code Mode with normal tool calls: a PreToolUse hook that errors no longer refuses a script's tool call, as outside Code Mode. It also adds limits and start rules for scripts.
What to do
| Change | Detail |
|---|---|
| PreToolUse hook errors | no longer refuse a script's tool call; set "onFailure": "block" on a command, HTTP or MCP tool hook that must refuse |
| Line-range reads | a read over 256 MiB is refused (it could use gigabytes of memory) |
| Start conditions | Code Mode also starts when telemetry, nonessential traffic or feature flags are off; an administrator can keep it off in managed settings |
| Script names | a script that declares its own log, preview or sleep now runs |
| Telemetry | can turn on Code Mode while OpenTelemetry events and metrics are enabled; each tool call sends its events; tracing still keeps it off |
| MCP waits | a script now waits up to ten minutes on a slow MCP call, then gets an error instead of a "moved to the background" message |
Limits and open questions
- The notes do not say which Claude Code version introduced Code Mode.
- A mod that lists only some tools no longer keeps Code Mode off; use managed settings instead.
Not for: hooks outside Code Mode.
Sources
- Claude Code v2.1.329, Anthropic, 2026-11-19: "a PreToolUse hook that errors no longer refuses a script's tool call"
Checked
2026-11-24; read the v2.1.329 release page; no command was run.
Started from a post by @Anthropic, packaged by the editor. Original post