anthropics / anthropics/financial-services

Empty hooks.json causes plugin load failure on Claude Code 2.1+ (financial-analysis, equity-research)

Đang mở
#229 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
34.8k
Fork
5.2k
Merge trung bình
2 giờ 2 phút
Pull request đã merge (30 ngày)
3

Mô tả

## Bug Description

Two vertical plugins fail to load on Claude Code 2.1+ due to invalid `hooks.json` schema. The files contain an empty array `[]`, but the current Claude Code plugin loader expects either no `hooks/` directory at all or a `hooks.json` containing a valid object (record keyed by hook event name).

## Affected Files

- `plugins/vertical-plugins/financial-analysis/hooks/hooks.json`
- `plugins/vertical-plugins/equity-research/hooks/hooks.json`

Both files currently contain:
```json
[]
```

## Error Message

```
Hook load failed: [
{
"expected": "record",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received array"
}
]
```

## Reproduction

```bash
claude plugin marketplace add anthropics/financial-services
claude plugin install financial-analysis@claude-for-financial-services
claude plugin install equity-research@claude-for-financial-services
claude plugin list
```

Both plugins show `Status: ✘ failed to load`.

## Environment

- Claude Code version: 2.1.85
- OS: Windows 11

## Suggested Fix

Either:
1. Remove the empty `hooks/` directories from both plugins (simplest — neither plugin actually defines hooks), or
2. Replace file contents with `{}` (empty object instead of empty array)

Option 1 is cleaner since there's no reason to ship an empty hooks file.

## Workaround

Users can manually delete the directories after install:

```bash
rm -rf ~/.claude/plugins/cache/claude-for-financial-services/financial-analysis/0.1.0/hooks
rm -rf ~/.claude/plugins/cache/claude-for-financial-services/equity-research/0.1.0/hooks
```

After this, both plugins load successfully.

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.