Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.265 ·

Hook registration: duplicate once-only event registration now throws, and pattern-based event names supported

Hook registration now rejects registering the same once-only event twice and validates names as patterns

TierUse it nowhow much it should matter to you
Useful3my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaHookswhat it touches
KindImprovementsin v2.1.265,
Use it now

Hook registration now rejects registering the same once-only event twice and validates names as patterns

What

When a hook (custom code that runs on a specific event) is registered with on(event, ...), event names are now validated as patterns rather than plain names. Registering the same once-only event more than once now throws an error reading "registered twice." Error messages for hook registration also now refer to a 'pattern' instead of an 'event' in their wording.

Why

This catches a mistake, accidentally registering the same one-time hook event twice, that previously could pass silently, and the wording change reflects that event names are now matched as patterns rather than exact strings.

See this entry in the whole of v2.1.265 →

Feedback