Follow Discord
Sweep 23 Nov 2026 · 19:13Z Build v2.1.331 548 read Stable v2.1.323 Latest v2.1.330 Next v2.1.331 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.331 ·

Hook command paths can be auto-quoted, and dropped computer-result rewrites are reported

Hook commands get automatic path quoting, and PostToolUse hooks that rewrite computer-tool results get a message when the rewrite is dropped

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

Unclear What makes Claude Code decide a hook's path needs quoting is not stated.

What

A hook is a command you configure to run automatically at certain points, for example after Claude uses a tool. This release changes two things about hooks:

  • Hook commands now go through a repair step that adds quotes around file paths. It only applies when none of the settings that guard against it are set. Before, the command ran as written, or with only the shell prefix added. Claude Code records whether the repair was applied.
  • PostToolUse hooks, which run after a tool call succeeds, have a new path for results from the computer tool, the tool Claude uses to control a screen. When such a hook tries to rewrite that result and the rewrite is dropped, this is now recorded and the hook gets a dedicated system message.

Why

Hooks whose file paths contain spaces may start working without you adding quotes by hand. If you have a PostToolUse hook that changes computer-tool results, note that its changes can be dropped, and you should now be told when that happens.

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 doubtWhat makes Claude Code decide a hook's path needs quoting is not stated.

See this entry in the whole of v2.1.331 →

Feedback