Claude Code v2.1.223 ·
Workflow scripts reject dynamic import()
Workflow scripts using dynamic import() now fail immediately with a clear syntax error instead of mid-run.
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
0Signal: worth watching, 1 to 5
ElsewhereArea: what it touches
ImprovementsKind: in v2.1.223,
ImprovementsSection of the release
What
A workflow script containing import() now fails at compile time with a SyntaxError instead of failing later when the VM refuses the module load.
Details
- The validator walks for
ImportExpression nodes and throws before execution, matching the existing VM-level importModuleDynamically refusal. - Previously only
with statements and reserved identifiers were rejected up front.
Evidence
import() is not available in workflow scripts.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeFixed workflow scripts being able to use dynamic import() to run code outside the workflow sandbox
See this entry in the whole of v2.1.223 →