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

Claude Code v2.1.307 ·

Plugin hooks get more faithful copies of their arguments

Arguments passed to plugin hooks are now copied with toJSON methods kept, typed arrays cloned, and endless toJSON chains rejected

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

Plugins can attach hooks, small pieces of code that Claude Code runs at certain moments, and Claude Code hands each hook a copy of the relevant data. Before, that copy kept only plain objects and lists, down to a fixed depth. Now:

  • toJSON methods (which decide how an object is turned into JSON text) are kept and applied again on the copy
  • typed arrays (fixed-type number lists) are copied with structuredClone
  • a toJSON that keeps returning something with another toJSON is rejected, with an error starting "a toJSON keeps answering with a value that holds another toJSON, more than"
  • a new adoptArgument hook is available
Why

Plugin authors may see different arguments arrive in their hooks, and a new error their hook can raise.

See this entry in the whole of v2.1.307 →

Feedback