{"version":"2.1.296","anchor":"plugin-hook-context-gains-isdispatching-and-renderfocus-roo","canonical_anchor":"plugin-hook-context-gains-isdispatching-and-renderfocus-roo","heading":"Plugin hooks get isDispatching, and ui.render and ui.focus handling moves to a shared check","tier":"use","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296\/e\/plugin-hook-context-gains-isdispatching-and-renderfocus-roo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296","markdown":"### Plugin hooks get isDispatching, and ui.render and ui.focus handling moves to a shared check\n\nThe context given to plugin hooks gains `isDispatching`, and the special handling of `ui.render` and `ui.focus` events now goes through a shared helper\n\n**Unclear.** What `isDispatching` reports and what the change means for a plugin in practice are not stated.\n\n**What**\n\nPlugins are add-ons that extend Claude Code, and plugin hooks are pieces of plugin code that Claude Code runs at set moments. Each hook receives a context object describing what triggered it. This release changes that context and the events it reports:\n\n- `isDispatching`: a new function in the context handed to plugin hooks.\n\n- Root event clearing: when the root event (the event that started the chain) is `ui.render` or `ui.focus`, it is now cleared for callers that were served by a pending call. Before, the context used the dispatch's root event directly.\n\n- Shared check: code that treated only `ui.render` and `ui.focus` specially now goes through a helper function, which may cover more event types.\n\n**Why**\n\nThese changes affect which interface event a plugin hook sees as its cause, and which plugin interface requests are rejected or allowed by default. Plugin authors who rely on the root event should check that their hooks still behave as expected.\n\n- Area: Plugins\n- Names: `isDispatching`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}