anthropics / anthropics/claude-code

Plugin auto-discovery loads invalid hook type causing /doctor diagnostics failure

Đang mở
#93,972 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:hooks area:plugins bug platform:macos
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

## Issue Summary
Claude Code `/doctor` command reports a persistent plugin error related to an invalid hook type, even after removing the problematic plugin from all local configurations.

## Error Details
Plugin: default@skills-library
Error Path: hooks > UserPromptExpansion
Message: Invalid option - 'UserPromptExpansion' is not a valid hook type

Valid hook types: PreToolUse, PostToolUse, PostToolUseFailure, Notification, UserPromptSubmit, SessionStart, SessionEnd, Stop, StopFailure, SubagentStart, SubagentStop, PreCompact, PostCompact, PermissionRequest, PermissionDenied, Setup, TeammateIdle, TaskCreated, TaskCompleted, Elicitation, ElicitationResult, ConfigChange, WorktreeCreate, WorktreeRemove, InstructionsLoaded, CwdChanged, FileChanged

## Root Cause
The fivetran/skills-library plugin (version 1.0.29) has an invalid hook configuration with 'UserPromptExpansion' hook type in hooks.json, which is not recognized as a valid hook type.

## Troubleshooting Attempted
- ✅ Removed plugin from installed_plugins.json
- ✅ Removed plugin from known_marketplaces.json
- ✅ Removed from enabledPlugins in settings.json
- ✅ Added to blocklist.json
- ✅ Cleared local plugin caches
- ✅ Removed invalid UserPromptExpansion hooks from all hooks.json files

## Issue
Despite all these steps, Claude Code auto-discovers and validates the fivetran/skills-library marketplace from GitHub on every startup, reloading the invalid hook configuration before checking if the plugin is disabled/blocklisted.

## Expected Behavior
- Option 1: Validate blocklist/disabled status BEFORE fetching and validating marketplace plugins
- Option 2: Don't report errors for blocklisted/disabled plugins
- Option 3: Remove invalid hook type from upstream plugin

## Environment
- Claude Code: 2.1.89
- Node: v20.10.0
- Platform: macOS

## Impact
Non-critical: Claude Code functionality works fine, but /doctor diagnostics incorrectly shows an error state.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.