{"version":"2.1.242","anchor":"each-hook-event-enforces-what-a-plugin-is-allowed-to-change","canonical_anchor":"each-hook-event-enforces-what-a-plugin-is-allowed-to-change","heading":"Each hook event enforces what a plugin is allowed to change","tier":"soon","area":"Plugins","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/each-hook-event-enforces-what-a-plugin-is-allowed-to-change","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Each hook event enforces what a plugin is allowed to change\n\nPlugin hooks are limited in what they may rewrite, and cannot take over question prompts.\n\n**What**\n\nReturn values from a hook are validated per event rather than trusted. A subagent spawn hook may only rewrite the model. A pre-tool-use hook must keep the tool envelope's keys intact. A prompt submission hook may return replacement text or a `drop` string. The question component is refused as a render target outright, because its answer authorises an action; a plugin can add context around it with a notice instead.\n\n**Details**\n\n- The full event list a module may hook is PreToolUse, tool.call, tool.describe, ui.render, ui.resolve, agent.spawn, prompt.submit, prompt.section, turn.start, turn.step, turn.complete and engine.create.\n- Validation is structural to the hooks engine, not tied to a separate flag.\n\n**Evidence**\n\n`is drawn by the engine alone; its answer authorises an action. A plugin adds context with $.ui.notice`\n\n- Area: Plugins\n- Tier: Nothing to try yet\n- Useful: 3\/5\n- Signal: 4\/5"}