{"version":"2.1.277","anchor":"plugin-hook-modules-now-skip-reload-when-unchanged","canonical_anchor":"plugin-hook-modules-now-skip-reload-when-unchanged","heading":"Plugin hooks reload logic now skips unnecessary rebuilds","tier":"internal","area":"Plugin Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/plugin-hook-modules-now-skip-reload-when-unchanged","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### Plugin hooks reload logic now skips unnecessary rebuilds\n\nClaude Code now detects when plugin hook modules haven't changed and skips rebuilding them\n\n**What**\n\nThe loader that builds plugin function-hooks now compares the incoming set of hook modules against what's already loaded:\n\n- If nothing changed, it short-circuits and logs \"hooks modules unchanged, kept as loaded\" instead of tearing everything down and rebuilding it.\n\n- If only some modules changed, it logs which ones were kept versus reloaded (\"hooks modules kept as loaded, unchanged\"), and logs \"hooks modules reloaded in full\" when a full reload does happen.\n\n- Internally, a new `isSetRecord` flag tracks whether the current module set is authoritative. It's cleared before a reload starts and only marked set again once the reload succeeds. A single-module reload path checks for changes via a new plugin-directory watch or an external scan, and clears `isSetRecord` when a change is found instead of treating the reload as authoritative.\n\n**Why**\n\nAvoiding unnecessary teardown and rebuild of hook modules when nothing actually changed makes plugin reloads faster and reduces disruption, while the new dirty-flag tracking keeps the loaded state accurate when changes do occur.\n\n- Area: Plugin Hooks\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}