Skip to content

Avoid Gemini loading Claude hook events#139

Open
Sonai124 wants to merge 1 commit into
DietrichGebert:mainfrom
Sonai124:fix-gemini-hook-discovery
Open

Avoid Gemini loading Claude hook events#139
Sonai124 wants to merge 1 commit into
DietrichGebert:mainfrom
Sonai124:fix-gemini-hook-discovery

Conversation

@Sonai124

Copy link
Copy Markdown

Fixes #137.

Summary

  • Move the Claude/Codex hook map from Gemini's auto-discovered hooks/hooks.json path to hooks/claude-codex-hooks.json.
  • Point both .claude-plugin/plugin.json and .codex-plugin/plugin.json at that host-specific hook config so SessionStart and UserPromptSubmit behavior remains available there.
  • Add a Gemini regression test that prevents reintroducing root hooks/hooks.json, plus a manifest test for the shared hook path.
  • Document why the Gemini adapter does not ship a root hook config.

Verification

  • node scripts/check-rule-copies.js
  • npm test (run with a temporary local python/python3 shim delegating to uv run --with pandas python, because this Windows shell has no Python on PATH)

Notes

Gemini CLI hard-codes extension hook discovery to hooks/hooks.json and does not define UserPromptSubmit; keeping Ponytail's Claude/Codex hook map out of that path avoids the invalid hook event warning.

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.

Gemini CLI: Invalid hook event name 'UserPromptSubmit' warning

1 participant