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:
toJSONmethods (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
toJSONthat keeps returning something with anothertoJSONis rejected, with an error starting "a toJSON keeps answering with a value that holds another toJSON, more than" - a new
adoptArgumenthook is available
Why
Plugin authors may see different arguments arrive in their hooks, and a new error their hook can raise.