Repository navigation
Load plugin hooks from hooks/hooks.json and every manifest entry - #429
Merged
Merged
Conversation
Claude Code loads hooks/hooks.json first and merges the manifest's `hooks` into it, where `hooks` is a path, an inline object, or an array of either. An array fell back to hooks/hooks.json, so plugins that list their hooks files registered none, and a declared path or object dropped the default file. Each file now loads once, and entries that are neither a path nor an object are skipped with a warning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sproott
force-pushed
the
plugin-hooks-array
branch
from
November 14, 2026 13:54
c4d8365 to
b132f9b
Compare
sproott
marked this pull request as draft
November 14, 2026 13:59
sproott
marked this pull request as ready for review
November 14, 2026 16:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude Code accepts a plugin manifest
hooksthat is a path, an inline object, or an array of either, and per the plugins reference "the default file loads first, and what the manifest declares merges into it."pi-code ignored arrays, so a plugin that lists its hooks files (ponytail, for one) registered no hooks, and a string or object
hooksskippedhooks/hooks.json. Nowhooks/hooks.jsonloads first, then every declared entry. A file listed twice loads once, and an entry that is neither a path nor an object is skipped with a warning.npm run checkpasses (Biome, strict tsc, Vitest)🤖 Generated with Claude Code