Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.308 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.246 ·

A plugin's JavaScript hooks module can now span several files

JavaScript plugin hooks can now import other files instead of being squeezed into one.

Use it now Notable New Features
JSON All of v2.1.246
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
PluginsArea: what it touches
New FeaturesKind: in v2.1.246,
What probably matters to youSection of the release
What

Hooks written in JavaScript were limited to one file; the entry file may now import other files, which are followed, compiled and parsed as part of the module. Two new ceilings apply, MAX_HOOKS_MODULE_FILES and MAX_HOOKS_MODULE_TOTAL_BYTES, on top of the existing per-file byte cap. Anything outside the import graph is refused. No new flag: this works wherever hooks modules already load.

Details
  • Only the entry file may use top-level await. An imported file that uses it is refused, because the runtime links the entry alone as an async module.
  • Hook registrations made through on are followed into imported helper functions.
  • Refused outright: shadowing or reassigning the registration API, re-exporting it from another file, and export *.
Evidence

a top-level await in a file the entry imports; the environment links the entry alone as an async module

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.246 →

Feedback