The Claude Code Changelog
All Episodes
Claude Code 2.1.332: Hook Stability Fixes and PreToolUse Prompts

Claude Code 2.1.332: Hook Stability Fixes and PreToolUse Prompts

0:00|0:00

This episode covers the November 25, 2026 release, which addresses wildcard rule freezes, runaway hook output, 50,000-character log truncation, and surfacing PreToolUse ask reasons in terminal prompts. We also look at worktree context deduplication, SSE MCP recovery, and plugin cache cleanup.


Chapter 1

Hook Stability and Quality of Life Fixes in v2.1.332

Lachlan Reed

Claude Code two point one point three three two dropped on November twenty fifth, twenty twenty six, brought to you by Jellypod AI. If you've been running custom hooks for linting or security checks, this release is going to save you a lot of grief. We're looking at four big hook and permission stability fixes, plus a few quality of life updates.

James Turner

Yeah, let's start with the wildcard rule freeze. Previously, if you had a permission rule or a hook condition with several wildcards, checking that against a really long command could just freeze the entire CLI. You'd be sitting there waiting for a prompt that never came back. That's fixed in two point one point three three two.

Lachlan Reed

It's like watching a regex engine choke on catastrophic backtracking, except it takes your whole terminal session down with it. The second fix is for runaway hook output. If a hook script started printing output without end, Claude Code would freeze up and burn through memory. The release notes say that's fixed in most cases now.

James Turner

Notice that phrasing, though. In most cases. So you still want to bound your own hook output rather than relying completely on the CLI to catch it. Related to that is hook log truncation. When a hook blocks or fails during a turn, or right after slash compact, and it dumps a massive log, that used to freeze the session and overflow your context window. Now, any text over about fifty thousand characters gets shortened automatically.

Lachlan Reed

Fifty thousand characters is still plenty of room, but here's the caveat you need to watch out for. If your test suite or linter prints a hundred thousand characters and the actual error is sitting right at the bottom, that useful part might get cut off when it's shortened. So if you've got a noisy script, pipe or tail the output before exiting nonzero. Keep the relevant lines at the top or trim it down so you stay well under that fifty thousand character mark.

James Turner

The fourth big fix is for PreToolUse hooks, specifically GitHub issues one zero two eight nine two and one zero five three four three. Previously, if a PreToolUse hook returned an ask decision on terminal file tools like Read, Grep, Glob, Edit, or Write, the hook's reason for asking just didn't show up in the prompt. Users were left staring at a permission prompt with zero context on why the operation was flagged.

Lachlan Reed

That was a real headache for teams enforcing policy. Now, when you upgrade to two point one point three three two or later, that reason surfaces directly in the terminal prompt. So if you're writing PreToolUse hooks, make sure you include a clear, actionable reason string in your ask response. Your teammates will actually see it before they hit approve or deny.

James Turner

Beyond the hook fixes, there are three smaller quality of life improvements worth noting. First, worktree context deduplication. When a session moves into a worktree under dot claude slash worktrees using EnterWorktree, or resumes there, CLAUDE dot md and your rules files were getting sent to the model a second time in most cases. That's fixed, so you're not burning duplicate tokens on every turn.

Lachlan Reed

Second is SSE MCP recovery. If an SSE MCP server had its event stream cut and came back on a new endpoint, or didn't come back at all, it used to hang or refuse every tool call until you reconnected it by hand. Now it recovers cleanly. And third, plugin cache cleanup. Those temp underscore folders that used to pile up in your home directory under dot claude slash plugins slash cache when a downloaded plugin couldn't be copied into place are finally getting cleaned up properly.

James Turner

So to put this to work today, update to Claude Code two point one point three three two, audit any noisy hook scripts to tail their logs under fifty thousand characters, and add clear reason strings to your PreToolUse ask responses. That's it for this update.