Skip to content

fix(hooks): use object schema in hooks.json instead of empty array#77

Open
Halxan-dev wants to merge 1 commit intoanthropics:mainfrom
Halxan-dev:fix/hooks-json-empty-array
Open

fix(hooks): use object schema in hooks.json instead of empty array#77
Halxan-dev wants to merge 1 commit intoanthropics:mainfrom
Halxan-dev:fix/hooks-json-empty-array

Conversation

@Halxan-dev
Copy link
Copy Markdown

Summary

  • Replace [] with {"hooks": {}} in hooks.json for the four plugins that currently fail to load on Claude Code (Hook load failed: expected object, received array).
  • Aligns with investment-banking/hooks/hooks.json, the only plugin in the marketplace that loads cleanly today.

Reproduction (pre-fix)

  • Claude Code on macOS / Windows (verified on Windows 11, Claude Code current).
  • claude plugin install <plugin>@financial-services-plugins
  • claude plugin list reports failed to load for the four plugins, with:
    Hook load failed: [
      {
        "expected": "object",
        "code": "invalid_type",
        "path": [],
        "message": "Invalid input: expected object, received array"
      }
    ]
    

Verification (post-fix)

  • cat <plugin>/hooks/hooks.json returns the multi-line {"hooks": {}} form, identical to investment-banking.
  • After reinstall, all five plugins should report enabled in claude plugin list (only the four touched by this PR were broken).

Linked issues

Files changed

  • financial-analysis/hooks/hooks.json
  • equity-research/hooks/hooks.json
  • private-equity/hooks/hooks.json
  • wealth-management/hooks/hooks.json

🤖 Generated with Claude Code

Four plugins ship hooks.json as `[]` (array), causing Claude Code to
reject loading with "expected object, received array". The schema
requires an object — use the same `{"hooks": {}}` form already used
by investment-banking, which loads correctly.

Plugins affected: financial-analysis, equity-research, private-equity,
wealth-management.

Fixes anthropics#70
Closes anthropics#69, anthropics#58, anthropics#5
Re-opens regression from anthropics#41

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants