{"version":"2.1.299","anchor":"plugin-hook-modules-managed-policy-restrictions-and-new-ses","canonical_anchor":"plugin-hook-modules-managed-policy-restrictions-and-new-ses","heading":"Plugin hook modules get more events and organization policy limits","tier":"notice","area":"Plugins","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/plugin-hook-modules-managed-policy-restrictions-and-new-ses","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Plugin hook modules get more events and organization policy limits\n\nPlugin hook modules can respond to more events, while plugins people install themselves face limits where an organization manages Claude Code\n\n**Unclear.** Whether the remote switch covers all of these changes or only the warning text is not clear.\n\n**What**\n\nPlugins (add-on packages) built as hook modules can now respond to more events:\n\n- `prompt.attachment`\n\n- `session.append`, with the attachment, hook-context, compaction, tool-message and note options\n\n- `session.compact`\n\n- `env.get` and `env.set`, for reading and setting environment variables (named values that programs read when they start)\n\n- `ui.log`\n\nWhere an organization manages Claude Code through managed settings, plugins a person installs themselves face new limits:\n\n- They cannot change protected environment variables.\n\n- Their tool names cannot match the name of a managed MCP server, an outside program the organization has set up to give Claude Code tools.\n\nA warning is added saying some hooks do not run in a plugin a person installs where an organization manages Claude Code. This new code is behind a remote switch that is off unless it is switched on remotely.\n\n**Why**\n\nOrganization policy now reaches further into what plugins can do. Plugins that people install themselves on managed machines may find some hooks do not run there.\n\n- Flag `tengu_iterative_haven`: Not enough to say (read for one account on one subscription tier against v2.1.299; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Plugins\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 4\/5\n- Scope: both\n- Heads-up: no"}