{"version":"2.1.259","anchor":"plugin-hooks-as-js-modules-gated-off-by-default","canonical_anchor":"plugin-hooks-as-js-modules-gated-off-by-default","heading":"Plugin hooks as JS modules \u2014 gated off by default","tier":"soon","area":"Plugin Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.259\/e\/plugin-hooks-as-js-modules-gated-off-by-default","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.259","markdown":"### Plugin hooks as JS modules \u2014 gated off by default\n\nPlugins can load hooks from real JS modules with per-action permission checks, but the rollout gate defaults off.\n\nNew machinery loads a plugin's hooks from actual JS modules (function hooks) rather than only declarative config, with permission checks for `call_handler`, `run_script`, and `get_handlers` actions. A loader logs `hooks module of plugin \"X\" not loaded: ...` with reasons such as `--bare` mode, `disableAllHooks`, or the rollout flag being off. The rollout is controlled by a growthbook gate, `tengu_plugin_hooks_modules`, that defaults to off, and can be forced on or off via the `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS` env var, which takes priority over the gate.\n\n- Area: Plugin Hooks\n- Names: `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS`, `tengu_plugin_hooks_modules`, `--bare`, `disableAllHooks`\n- Tier: Nothing to try yet\n- Useful: 5\/5\n- Signal: 5\/5\n- Present in the build but not switched on"}