Skip to content

Duplicate hooks.json loading error in plugin manifest #12

Description

@goosekeeper233

Bug

The plugin fails to load with this error:

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

Cause

In .claude-plugin/plugin.json, the manifest declares:

"hooks": "./hooks/hooks.json"

But Claude Code auto-loads hooks/hooks.json by convention when it exists in the plugin directory. Declaring it again in the manifest causes a duplicate load error.

Fix

Remove the "hooks" field from plugin.json — the file will still be picked up automatically.

Affected version: 2.0.0-alpha

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions