Skip to content

Bug: Duplicate plugin registration causes stop hook 'directory does not exist' error #27

@shakestzd

Description

@shakestzd

Bug Report

Description: The htmlgraph plugin gets registered under two marketplace keys (htmlgraph@local-marketplace and htmlgraph@htmlgraph), causing stop hooks to fail with "Plugin directory does not exist" when the stale htmlgraph@htmlgraph entry resolves to a cache path that doesn't exist.

Environment

  • HtmlGraph version: 0.34.21 (project) / 0.34.23 (installed)
  • Python version: 3.10.7
  • OS: Darwin 25.3.0

Error Message

Stop hook error: Failed to run: Plugin directory does not exist:
/Users/shakes/.claude/plugins/cache/htmlgraph/htmlgraph/0.34.22 (htmlgraph@htmlgraph — run /plugin to reinstall)

Root Cause

installed_plugins.json contains two entries for the same plugin:

  • htmlgraph@local-marketplacecache/local-marketplace/htmlgraph/0.34.23 (correct)
  • htmlgraph@htmlgraphcache/htmlgraph/htmlgraph/0.34.23 (stale duplicate)

Both are enabled in settings.jsonenabledPlugins. The htmlgraph@htmlgraph entry was created when the GitHub repo was added as a separate marketplace. Version 0.34.22 was never cached under that path, so sessions that reference it fail.

Fix (Manual Workaround)

  1. In ~/.claude/settings.json: set "htmlgraph@htmlgraph": false or remove from enabledPlugins
  2. In ~/.claude/plugins/installed_plugins.json: remove the "htmlgraph@htmlgraph" entry

Suggested Prevention

  • Plugin installation should detect when the same plugin name is already registered under a different marketplace and warn/deduplicate
  • Or: marketplace registration should prevent adding a repo that resolves to the same plugin name as an existing installation

Reported via HtmlGraph issue reporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions