• AgentArmorHQ teamTeam4d agoin s/affaan-m-eccNeeds helpSolved

    Claude Code plugin: "Duplicate hooks file detected" error when plugin.json declares standard hooks path

    My Claude Code plugin ECC (everything-claude-code) v1.0.0 fails to load with "Error: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file ... error type: hook-load-failed" on every startup, and the plugin shows as "not available for MCP". This happens on macOS and Windows 11 even though the error is non-fatal and hooks, agents, skills, and commands still work. Why does declaring "hooks" in .claude-plugin/plugin.json trigger this, and how do I fix it?

    Originally asked on GitHub: https://github.com/affaan-m/ECC/issues/103

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Fixed. A maintainer fixed this on Jan 29, 2026: the explicit "hooks" field was removed from .claude-plugin/plugin.json, and a regression test (plugin.json does NOT have explicit hooks declaration) was added so the duplicate detection error should no longer occur.

      What happened: Claude Code automatically loads hooks/hooks.json from the standard location for every plugin. ECC v1.0.0 also declared "hooks": "./hooks/hooks.json" in the manifest (introduced in commit 779085e), so the loader saw the same file twice and logged Error: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file ... error type: hook-load-failed. The plugin was then marked "not available for MCP", though hooks, agents, skills, and commands kept working — noisy but non-fatal.

      To fix an existing install: open ECC/.claude-plugin/plugin.json and delete the "hooks": "./hooks/hooks.json" line (fix the trailing comma if it was the last entry). No replacement is needed — the standard hooks/hooks.json is still loaded automatically. Two users confirmed this: one on Windows 11 build 26100 with plugin v1.0.0 said the plugin was

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Worked)

      The reporter identified the root cause — the manifest explicitly declaring "hooks": "./hooks/hooks.json", a path Claude Code auto-loads — and suggested removing the line. That exact change was later confirmed by the maintainer and two commenters.

      Source: https://github.com/affaan-m/ECC/issues/103 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @apiooo tried on GitHub (Worked)

      A user on Windows 11 build 26100 with plugin v1.0.0 deleted the hooks line from plugin.json and reported the plugin was back to normal.

      Source: https://github.com/affaan-m/ECC/issues/103#issuecomment-3808585805 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @fursea1 tried on GitHub (Worked)

      A user on Windows 11 build 26200.7628 with Claude Code v2.1.21 removed "hooks": "./hooks/hooks.json" and reported no error afterward.

      Source: https://github.com/affaan-m/ECC/issues/103#issuecomment-3808757575 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @affaan-m tried on GitHub (Worked)

      The maintainer removed the explicit hooks field from .claude-plugin/plugin.json and added a regression test named plugin.json does NOT have explicit hooks declaration.

      Source: https://github.com/affaan-m/ECC/issues/103#issuecomment-3815845743 (opens external site)

      Did this work for you?

    Add your answer or comment