[BUG] claude plugin validate passes a marketplace entry with hooks as a path or array, but the installed plugin fails to load
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start at the claude plugin validate marketplace entry validation path and compare its handling of hooks with the loader error described in the issue. Find the validator tests for marketplace entries, then add coverage for string and array values. Done means validation reports the unsupported forms as errors with the loader’s message.
Written by the indexing model from the issue text.
Description
What's wrong?
claude plugin validate passes a marketplace entry whose hooks field is a file path (or an array). claude plugin install then succeeds, but the installed plugin fails to load:
Status: ✘ failed to load
Error: Hook load failed: hooks: the file-path and array forms are not yet supported in a marketplace entry. Define hooks in the plugin's own hooks/hooks.json (or its plugin.json), or inline them here as an object mapping hook event names to matcher arrays.
The loader already knows these forms are unsupported. The validator should report the same thing as an error, so authors find out before they publish instead of after users install.
Steps to reproduce
.claude-plugin/marketplace.json:
{
"name": "hooks-repro",
"owner": {"name": "Example"},
"plugins": [
{
"name": "greeter",
"source": "./plugins/greeter",
"description": "Says hello at session start",
"hooks": "./hooks/hooks.json"
}
]
}
plugins/greeter/hooks/hooks.json:
{"hooks": {"SessionStart": [{"hooks": [{"type": "command", "command": "echo hello"}]}]}}
Then:
claude plugin validate . # ✔ Validation passed with warnings (only: no marketplace description)
claude plugin marketplace add "$PWD"
claude plugin install greeter@hooks-repro # ✔ Successfully installed
claude plugin list # Status: ✘ failed to load (error above)
An array value ("hooks": ["./hooks/hooks.json"]) behaves the same way.
Expected
claude plugin validate fails on an entry hooks that is a string or an array, with the same message the loader gives.
Environment
- Claude Code 2.1.319
- Linux
Related: #54810 (the "Will install" preview lists a string hooks path as character indices).
- Dominant language
- TypeScript
- Stars
- 154k
- Forks
- 25.6k
- Avg merge
- 12h 27m
- Merged PRs (30d)
- 4
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anthropics/claude-code
-
area:tui bug keybindings platform:linux
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
anthropics/claude-code#108201 ·
-
area:docs documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anthropics/claude-code#108192 · 1 comment ·
-
area:agents area:plugins bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anthropics/claude-code#108157 ·
-
area:api area:docs documentation enhancement platform:macos
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
anthropics/claude-code#108146 ·
-
area:chrome area:permissions bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
anthropics/claude-code#108139 ·
All issues in anthropics/claude-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
earendil-works/pi-claude-code#36 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Resources: New work of jabodetabekPossibly taken @rmt-svc claimed this today. Openresources
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
railmapgen/rmp-gallery#4167 ·
Maintainers usually reply within 2 days
-
documentation p1
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
microsoft/monaco-editor#5577 ·
Maintainers usually reply within 1 day