[Bug] Disabled marketplace plugins register hooks and cause persistent errors

Resolved 💬 4 comments Opened Mar 18, 2026 by jordan-of Closed Apr 18, 2026

Bug Description
Bug: Installed-but-not-enabled marketplace plugins register hooks and produce errors

Reporter: Jordan Dea-Mattson (GitHub: jordan-of, jordandm) — jordan-of@users.noreply.github.com
Version: Claude Code 2.1.77
Platform: macOS Darwin 25.2.0

Summary

Plugins from the claude-plugins-official marketplace register their hooks even when not listed in enabledPlugins. This causes persistent "hook error" messages on every user interaction with no way to
suppress them.

Steps to Reproduce

  1. Have the claude-plugins-official marketplace installed (default)
  2. Do NOT enable the hookify plugin in enabledPlugins (either project or user settings)
  3. Use Claude Code normally — edit files, submit prompts

Observed Behavior

Every turn produces one or more of these errors:
UserPromptSubmit hook error
PostToolUse:Edit hook error
PostToolUse:Write hook error

No additional error detail is shown to the user, even in verbose mode (Ctrl+O).

Root Cause

The hookify plugin (plugins/hookify/hooks/hooks.json) registers hooks on PreToolUse, PostToolUse, Stop, and UserPromptSubmit. These hooks are loaded regardless of whether hookify is in enabledPlugins.
When the hooks fire, the Python scripts fail on import (from core.config_loader import load_rules) because CLAUDE_PLUGIN_ROOT is not set for non-enabled plugins, producing silent errors.

Expected Behavior

Plugins should only have their hooks loaded when explicitly enabled in enabledPlugins. Marketplace plugins that are installed but not enabled should be inert.

Additional Notes

  • The errors are non-blocking (hookify exits 0), but they appear on every single interaction, creating noise
  • The error messages provide no actionable detail — just "hook error" with no indication of which plugin or what went wrong
  • There is no obvious way for users to suppress these errors short of deleting the plugin files from the marketplace directory
  • More detailed error messages (e.g., "hookify plugin: import failed — plugin not enabled?") would help users diagnose the issue

Workaround

Delete or rename ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/hooks.json to prevent the hooks from being loaded.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.77
  • Feedback ID: 8c067d1e-cde3-47fd-8426-fc36af1740d3

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at aW_ (/$bunfs/root/src/entrypoints/cli.js:2475:32833)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T06:08:22.980Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at aW_ (/$bunfs/root/src/entrypoints/cli.js:2475:32833)\n    at async M (/$bunfs/root/src/entrypoints/cli.js:4808:17741)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T06:08:23.181Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at aW_ (/$bunfs/root/src/entrypoints/cli.js:2475:32833)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:4808:17025)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T06:08:23.184Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at aW_ (/$bunfs/root/src/entrypoints/cli.js:2475:32833)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:4808:17025)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T12:09:12.616Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at aW_ (/$bunfs/root/src/entrypoints/cli.js:2475:32833)\n    at async M (/$bunfs/root/src/entrypoints/cli.js:4808:17741)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T12:09:12.617Z"},{"error":"MaxFileReadTokenExceededError: File content (51385 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at TT7 (/$bunfs/root/src/entrypoints/cli.js:1517:8032)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T12:11:16.368Z"},{"error":"MaxFileReadTokenExceededError: File content (25344 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at TT7 (/$bunfs/root/src/entrypoints/cli.js:1517:8032)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-17T12:11:35.412Z"},{"error":"Error: Plugin MCP server error - mcp-conf…

Note: Content was truncated.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗