Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.271 ·

Error.hasInstance cross-realm polyfill made more precise

A Node VM sandbox polyfill for Error instance checks now only overrides behavior for the base Error class

Under the hood Internal Changes
JSON All of v2.1.271
Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
ElsewhereArea: what it touches
Internal ChangesKind: in v2.1.271,
Internal ChangesSection of the release
What

Claude Code runs some code inside a Node VM context (an isolated JavaScript sandbox), which needs a workaround so instanceof Error checks work correctly across that boundary. That workaround now only kicks in when the check is against Error itself; checks against subclasses of Error fall back to JavaScript's normal built-in behavior instead of being overridden.

Why

The previous version overrode the check unconditionally, which could give wrong answers for custom error subclasses. Narrowing it to just Error makes instance checks behave correctly in more cases.

See this entry in the whole of v2.1.271 →

Feedback