Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.287 ·

Hooks modules can no longer use dynamic import()

Claude Code now refuses a hooks module that uses import() and tells the author to use a static import declaration instead

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

Unclear It is not clear whether hooks modules themselves are generally available or limited by a switch.

What

A hooks module is a code file that defines hooks, scripts that run automatically at set points. Claude Code now refuses a hooks module that loads other files with import(), a way of loading code while the program is running. The message tells the author to import their own files with an import declaration at the top of the file instead, such as import { name } from "./file.js".

Why

A hooks module that uses import() will be refused, so anyone writing one needs to switch to import declarations.

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 hooks modules themselves are generally available or limited by a switch.

See this entry in the whole of v2.1.287 →

Feedback