{"version":"2.1.242","anchor":"a-plugin-hook-can-block-a-subagent-from-launching","canonical_anchor":"a-plugin-hook-can-block-a-subagent-from-launching","heading":"A plugin hook can block a subagent from launching","tier":"soon","area":"Subagents","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/a-plugin-hook-can-block-a-subagent-from-launching","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### A plugin hook can block a subagent from launching\n\nA plugin hook can block a subagent from starting or change which model it uses.\n\n**What**\n\nBefore spawning a subagent, Claude Code now runs an `agent.spawn` hook carrying the tool use id, prompt, subagent type, model, permission mode, and whether the spawn is background, forked, and its working directory. A deny aborts the launch and is recorded as `subagent_spawn_denied_by_hook`. The hook may also swap the model the subagent runs on.\n\n**Evidence**\n\n`Subagent spawn denied by a plugin: `\n\n- Area: Subagents\n- Tier: Nothing to try yet\n- Useful: 3\/5\n- Signal: 5\/5\n- Present in the build but not switched on"}