Skip to content

Remove redundant hooks reference from plugin.json#1

Open
zgold wants to merge 1 commit intoanutron:mainfrom
zgold:fix-duplicate-hooks-manifest
Open

Remove redundant hooks reference from plugin.json#1
zgold wants to merge 1 commit intoanutron:mainfrom
zgold:fix-duplicate-hooks-manifest

Conversation

@zgold
Copy link
Copy Markdown

@zgold zgold commented Apr 27, 2026

Summary

The plugin manifest declares "hooks": "./hooks/hooks.json", but Claude Code 2.1.92+ auto-loads ./hooks/hooks.json from the standard path. The duplicate causes a load error and the hooks fail to register:

Hook load failed: Duplicate hooks file detected: ./hooks/hooks.json
resolves to already-loaded file /Users/.../plugins/cache/.../hooks/hooks.json.
The standard hooks/hooks.json is loaded automatically, so manifest.hooks
should only reference additional hook files.

Removing the redundant manifest field lets hooks load via the auto-discovery path. The skills field is kept since ./skills/ isn't auto-discovered the same way.

Test plan

  • Reinstall the plugin in Claude Code
  • Confirm no "Duplicate hooks file detected" error on session start
  • Confirm hook events from hooks/hooks.json still fire

🤖 Generated with Claude Code

Claude Code 2.1.92+ auto-loads ./hooks/hooks.json from the standard path,
so declaring it in manifest.hooks causes a duplicate-load error:

  Hook load failed: Duplicate hooks file detected: ./hooks/hooks.json
  resolves to already-loaded file ... The standard hooks/hooks.json is
  loaded automatically, so manifest.hooks should only reference additional
  hook files.

Removing the field lets hooks load via the auto-discovery path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant