Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.336 ·

Bash hooks that run before a command now get the command with spaces trimmed

On macOS and Linux, PreToolUse hooks for Bash now get the command trimmed and may match it on a normalized form

You'll notice Improvements
JSON All of v2.1.336
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.336,
ImprovementsSection of the release

Unclear It is not clear what normalized form of the command hook patterns are now matched against.

What

PreToolUse hooks are scripts that run before a tool call and can block it. On systems other than Windows, those hooks for the Bash tool, which runs shell commands, now receive the command in tool_input with surrounding spaces trimmed. Before, tool_input was passed on unchanged. When Claude Code matches hooks to these calls, it also checks an extra name derived from the command.

Why

If you have PreToolUse hooks with if or matcher patterns on Bash commands, they may now match differently. Check that they still catch the commands you expect.

Read from
Names in the bundlePreToolUsetool_input
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear what normalized form of the command hook patterns are now matched against.

See this entry in the whole of v2.1.336 →

Feedback