Follow Discord
Sweep 03 Nov 2026 · 22:27Z Build v2.1.318 536 read Stable v2.1.311 Latest v2.1.318 Next v2.1.318 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.318 ·

Hook matcher metadata no longer names the field each matcher checks

Many hook events, including SessionStart, PreCompact, PostCompact and StopFailure, drop fieldToMatch from their matcher details and keep only values

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

Unclear It is not clear whether this only changes descriptions or also how hook matchers are applied.

What

A hook is a command you configure to run at set points in Claude Code, such as when a session starts. A matcher narrows which occasions a hook runs for. Each hook event carries descriptive details about its matcher (matcherMetadata). Those details no longer include fieldToMatch, the name of the field the matcher checks. Only the list of possible values remains.

  • SessionStart and the command-expansion hook event drop fieldToMatch: "command_name" and fieldToMatch: "source".
  • Hook events that match on tool names drop fieldToMatch: "tool_name".
  • The hook event documented with "Exit code 2 - block the response (action becomes decline)" drops fieldToMatch: "mcp_server_name", and its details are now just { values: [] }.
  • The add-dir hook event drops fieldToMatch: "source" and keeps the values slash_command and register_repo_root.
  • PreCompact and PostCompact drop fieldToMatch: "trigger" and keep the values manual and auto.
  • StopFailure drops fieldToMatch: "error". Its description, "Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn.", and its values such as rate_limit and overloaded remain.
  • Separately, a project entry is added to a list of commands where the neighbouring entries belong to the "config" group.

Why

These details feed hook documentation and setup screens, so those may stop saying which field a matcher checks. The matcher values themselves are unchanged. The findings do not show whether matching or validation behaves differently.

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 whether this only changes descriptions or also how hook matchers are applied.

See this entry in the whole of v2.1.318 →

Feedback