{"version":"2.1.299","anchor":"plugin-hooks-passed-over-under-managed-settings","canonical_anchor":"plugin-hooks-passed-over-under-managed-settings","heading":"Plugin hook engine adds turn.start, a managed-settings notice and skill frontmatter","tier":"notice","area":"Plugins","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/plugin-hooks-passed-over-under-managed-settings","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Plugin hook engine adds turn.start, a managed-settings notice and skill frontmatter\n\nPlugin hooks gain turn.start and tool.register events, a managed-install notice, restoreArgument, and skill frontmatter passed to skill.prompt\n\n**Unclear.** The events whose plugin hooks are skipped are not named.\n\n**What**\n\nHooks are small pieces of code a plugin runs at set points while Claude Code works. The engine that runs them changed in several ways.\n\n- `turn.start` now counts, together with `turn.step` and `turn.complete`, when Claude Code decides whether any hooks are active. A try\/catch that called an error handler was removed in the same area.\n\n- A new status explains that, where an organization manages Claude Code, a plugin's hooks on certain events do not run: \"these events pass over the plugins you install\". Only the organization's own plugins run hooks on those events.\n\n- A new `tool.register` hook event is added.\n\n- A plugin with a module path (`modulePath`) now counts as having hooks in the reports sent when a plugin loads or is enabled. Before, only `hooksConfig` counted.\n\n- The engine gains `restoreArgument` for `prompt.submit` and `skill.prompt`.\n\n- A check on frontmatter data, the settings block at the top of a skill file, rejects prototype keys, proxies, cycles and accessors.\n\n- `skill.prompt` now also receives the skill's frontmatter as written in the file, a `frontmatterProblem` field, and the skill's source, plugin name and path. Before, it received only `{ skill, text }`. If the frontmatter cannot be copied, it gets `{}` and a warning is logged.\n\n- Separately, several functions that write session files return early in what looks like a diskless session mode. One throws \"A diskless session writes no side file to disk\".\n\n**Why**\n\nPlugin authors can react to the start of a turn and read or rewrite a skill's frontmatter. People on managed installs get a reason when their own plugins' hooks do not run.\n\n- Area: Plugins\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}