Skip to content

fix(plugin): stop double-registering the Claude hooks file - #2560

Merged
namastex888 merged 17 commits into
devfrom
fix/claude-plugin-duplicate-hooks
Jul 12, 2026
Merged

namastex888 merged 17 commits into
devfrom
fix/claude-plugin-duplicate-hooks

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

The Genie plugin fails to load its hooks in Claude Code. Reported on a live install (v5.260712.1):

Failed to load hooks from ~/.claude/plugins/cache/automagik/genie/<version>/hooks/hooks.json:
Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file
~/.claude/plugins/cache/automagik/genie/<version>/hooks/hooks.json.
The standard hooks/hooks.json is loaded automatically, so manifest.hooks should
only reference additional hook files.

Root cause

plugins/genie/.claude-plugin/plugin.json declared:

"hooks": "./hooks/hooks.json"

Claude Code auto-loads hooks/hooks.json from the standard path. Naming it again in manifest.hooks registers the same file twice, so hook loading aborts for the whole plugin.

Fix

Drop the redundant field. The hooks file is untouched and still bundled by scripts/build-binary.sh; only the duplicate manifest reference is removed. No script regenerates this field (scripts/version.ts et al. only rewrite version), so the fix stays put across releases.

The Codex manifest (.codex-plugin/plugin.json) intentionally keeps its "hooks": "./hooks/codex-hooks.json" — that is a non-standard filename and is not auto-loaded, so it still needs the explicit reference.

Testing

  • bun test — 1396 pass, 0 fail
  • tsc --noEmit clean, biome check clean

🤖 Generated with Claude Code

release-bot and others added 17 commits July 10, 2026 20:47
chore: rolling promotion dev -> main
chore: rolling promotion dev -> main
The Claude plugin manifest declared:

  "hooks": "./hooks/hooks.json"

Claude Code already loads hooks/hooks.json automatically from the standard
path, so naming it again in manifest.hooks registers the same file twice and
the plugin fails to load its hooks:

  Failed to load hooks from .../automagik/genie/<version>/hooks/hooks.json:
  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.

Drop the redundant field. The file itself is unchanged and still shipped by
build-binary.sh; only the duplicate manifest reference is removed.

The Codex manifest keeps its "hooks" field on purpose: it points at
./hooks/codex-hooks.json, a non-standard filename that is not auto-loaded.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a0bf631d-8cee-4266-8de3-8f850827fd83

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/claude-plugin-duplicate-hooks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the release version, timestamp, and tarball base URL to 5.260712.1 across the dev, homolog, and stable environment configuration files. It also removes the hooks property from the Claude plugin configuration file. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 097ac4222d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .well-known/latest.json
Comment on lines +4 to +6
"version": "5.260712.1",
"released_at": "2026-07-12T02:43:05Z",
"tarball_base": "https://github.com/automagik-dev/genie/releases/download/v5.260712.1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Publish a new release for the hook fix

This updates the stable channel to download v5.260712.1, but this same commit says the live v5.260712.1 install is the one with the duplicate Claude hooks entry, and the released_at value here (2026-07-12T02:43:05Z) predates this fix commit (2026-07-12 20:52 UTC). Since genie update reads .well-known/latest.json and then downloads the tarball from tarball_base, stable users will still receive the already-published broken tarball rather than the manifest change in this commit. Please bump/publish a new version containing the plugin manifest fix before advancing the channel pointers.

Useful? React with 👍 / 👎.

@namastex888
namastex888 merged commit b6448f3 into dev Jul 12, 2026
13 of 15 checks passed
namastex888 added a commit that referenced this pull request Jul 12, 2026
Merges dev (incl. #2560 duplicate-hooks fix, v5.260712.1 manifests) and
resolves the F05 resurrection: the external scheduled metrics-updater
pushed .genie/agents/metrics-updater/{runs.jsonl,state.json} and the
README METRICS block directly to dev on 2026-07-12 (d0ecc29), turning
dev CI red against the merged retirement gate. This merge re-deletes
the state and strips the block; the gate test passes again. The
external routine itself must be disabled or re-scoped — a repo commit
cannot prevent the next push.
@automagik-genie
automagik-genie deleted the fix/claude-plugin-duplicate-hooks branch September 25, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant