{"version":"2.1.277","anchor":"plugin-hook-dispatch-deep-copies-input-for-a-fixed-set-of-ui","canonical_anchor":"plugin-hook-dispatch-deep-copies-input-for-a-fixed-set-of-ui","heading":"Plugin hook dispatch deep-copies input for a fixed set of UI\/registration events","tier":"internal","area":"Plugin Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/plugin-hook-dispatch-deep-copies-input-for-a-fixed-set-of-ui","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### Plugin hook dispatch deep-copies input for a fixed set of UI\/registration events\n\nPlugin hooks now receive a deep copy of the event payload for UI and registration events, not the original\n\n**What**\n\nFor a fixed list of plugin events, `ui.open`, `ui.toast`, `ui.status`, `ui.log`, `ui.notice`, `ui.ask`, `tool.register`, `command.register`, `agent.register`, `prompt.fill`, and `prompt.suggest`, Claude Code now passes hooks a deep copy of the event's data instead of the original object, before any hook has a chance to see or change it.\n\n**Why**\n\nThis stops a plugin hook from being able to mutate the original event data that Claude Code itself still relies on, isolating hook side effects to their own copy for these UI and registration events.\n\n- Area: Plugin Hooks\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}