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.335 ·

Plugin event .catch() must sit on the same statement as its on()

Plugin code now gets an error if .catch() is attached after the event is set up, and must sit on the same statement as on()

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

Unclear It is not clear whether attaching .catch() after registration is now allowed where it was not before.

What

Plugins add features to Claude Code and can listen for events using on(). The error about attaching .catch(), which handles failures, has changed. It used to fire once registration had finished. It now fires when the event has already been set up, and says .catch() goes on the same statement as its on().

Why

Plugin authors may see this different error and need to keep .catch() on the same line of code as the on() it belongs to.

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 attaching `.catch()` after registration is now allowed where it was not before.
Anthropic's release notes agreeAdded support for mods calling on() inside their session.start hook, so hooks can be registered based on a fetch or MCP call

See this entry in the whole of v2.1.335 →

Feedback