Elixir-ls Plugin works but has duplicate hooks clause which logs error
Bug Report 2: ElixirLS
Plugin Information
Plugin name: elixir-ls Plugin version: 1.0.0
Environment
Claude Code version: 2.1.1 Operating System: macOS 15.6.1 LSP server version: ElixirLS v0.30.0
Checklist
- I am using Claude Code v2.1.0 or later
- I checked the Plugins tab in Claude Code (/plugin) for errors
- I verified the LSP server is installed according to Manual Installation instructions
- I verified the LSP binary is in my PATH (which elixir-ls)
- I checked Claude Code logs at ~/.claude/debug/
Description
The plugin.json explicitly references "hooks": "./hooks/hooks.json" but Claude Code automatically loads hooks/hooks.json from the standard location, causing a duplicate detection error.
Note: Despite this error, elixir-ls still loads and works. However, the error is logged and may cause issues in some scenarios.
Steps to Reproduce
- Install elixir-ls plugin: /plugin install elixir-ls@claude-code-lsps
- Restart Claude Code
- Check debug logs at ~/.claude/debug/
- See duplicate hooks error
Expected Behavior
Plugin should load without errors.
Actual Behavior
Plugin loads with a "hook-load-failed" error logged, though LSP functionality still works.
Error Messages
2026-01-08T19:10:53.195Z [DEBUG] Loaded hooks from standard location for plugin elixir-ls: ~/.claude/plugins/cache/claude-code-lsps/elixir-ls/1.0.0/hooks/hooks.json 2026-01-08T19:10:53.195Z [ERROR] Error: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file. The standard hooks/hooks.json is loaded automatically, so manifest.hooks should only reference additional hook files.
2026-01-08T19:01:45.114Z [DEBUG] Plugin not available for MCP: elixir-ls@claude-code-lsps - error type: hook-load-failed
Additional Context
Fix: Remove "hooks": "./hooks/hooks.json" from .claude-plugin/plugin.json: { "name": "elixir-ls", "description": "Elixir language server", "version": "1.0.0", "author": { "name": "Jan Kott" },
- "hooks": "./hooks/hooks.json", "lspServers": "./.lsp.json" }
This same issue likely affects all plugins in the repository that have hooks/hooks.json referenced in their plugin.json.
Fixed in #27.
Removed redundant hooks and lspServers refs from plugin.json. These are auto-discovered from default locations.