fix(plugin): remove the duplicate hooks key from the installed manifest - #27
Merged
Merged
Conversation
Claude Code loads hooks/hooks.json by convention, so a manifest that also declares it fails to load: Hook load failed: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file .../purchasely/2.0.0/hooks/hooks.json The skills, the commands and the agent still loaded, the SessionStart hook did not, and claude plugin list reported the plugin as failed. 2.0.0-rc.6 removed the same key from the root .claude-plugin/plugin.json, but the marketplace entry installs ./purchasely, so the nested manifest is the one that reaches the harness and it kept the key. Verified with a real install from a local marketplace: status goes from "failed to load" to "enabled", and claude plugin details reports Hooks (1) SessionStart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| purchasely/.claude-plugin/plugin.json | Removes the duplicate explicit hook path while retaining the conventionally discovered hook file in the installed package. |
| CHANGELOG.md | Accurately documents the duplicate-hook failure, marketplace source mapping, and scope of the fix. |
Reviews (1): Last reviewed commit: "fix(plugin): remove the duplicate hooks ..." | Re-trigger Greptile
macminisupport
approved these changes
Sep 2, 2026
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.
Symptom
A fresh
claude plugin install purchasely@Purchasely-AI-Pluginloads the skills, the commands and the agent, butclaude plugin listreports the plugin as broken:The consequence is the
SessionStarthook:hooks/intro.mdnever reaches the session, so the routing text that tells the agent which skill to load is missing.Cause
Claude Code loads
hooks/hooks.jsonby convention. A manifest that declares it again is a duplicate.2.0.0-rc.6already fixed this, but in the wrong file. It removed the key from the root.claude-plugin/plugin.json, while.claude-plugin/marketplace.jsoninstalls"source": "./purchasely". The manifest the harness actually reads ispurchasely/.claude-plugin/plugin.json, and that one kept"hooks": "./hooks/hooks.json"through2.0.0,2.0.1and2.1.0.Checked the other manifests:
purchasely/.cursor-plugin/plugin.json,purchasely/.codex-plugin/plugin.json,.claude-plugin/plugin.jsonand.cursor-plugin/plugin.jsondeclare nohookskey. One line changes.Verification
Installed the fixed copy from a local marketplace, uninstalled afterwards:
Status goes from
✘ failed to loadto✔ enabled, and the hook is inventoried.A
2.1.1release follows this merge.🤖 Generated with Claude Code