Skip to content

fix: use PostToolUse instead of invalid PostEdit/PostGit hook events#26

Merged
tirth8205 merged 1 commit intotirth8205:mainfrom
lbzepoqo:fix/hook-event-types
Mar 20, 2026
Merged

fix: use PostToolUse instead of invalid PostEdit/PostGit hook events#26
tirth8205 merged 1 commit intotirth8205:mainfrom
lbzepoqo:fix/hook-event-types

Conversation

@lbzepoqo
Copy link
Copy Markdown
Contributor

Problem

hooks/hooks.json uses PostEdit and PostGit as hook event types, but these are not valid Claude Code hook events. They cause a validation error on the plugins page, preventing the hooks from loading at all.

Closes #25

Fix

Replace both invalid entries with a single PostToolUse entry:

  • PostEdit (matcher: Write|Edit) → PostToolUse (matcher: Write|Edit) — file edits still go through the Write/Edit tools
  • PostGit (matcher: commit) → PostToolUse (matcher: Bash) — git commits go through the Bash tool

Since both now use PostToolUse, they're merged into one entry with matcher Write|Edit|Bash. The update command is idempotent, so triggering on all Bash calls is safe.

Also removes the _comment field that claimed these were "confirmed working as of v1.6.4" — they are not valid in current Claude Code.

🤖 Generated with Claude Code

PostEdit and PostGit are not valid Claude Code hook event types and
cause a validation error that prevents the plugin hooks from loading.

The valid event type is PostToolUse. Replace both entries with a single
PostToolUse entry using matcher "Write|Edit|Bash":
- Write/Edit tool calls cover file modifications (previously PostEdit)
- Bash tool calls cover git commits (previously PostGit with "commit" matcher)

The update command is idempotent so triggering on all Bash calls is safe.

Fixes tirth8205#25

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tirth8205 tirth8205 merged commit f6ba743 into tirth8205:main Mar 20, 2026
1 check passed
tirth8205 added a commit that referenced this pull request Mar 20, 2026
Replace stale PostEdit/PostGit references with PostToolUse (Write|Edit|Bash)
in architecture.md, FEATURES.md, and LLM-OPTIMIZED-REFERENCE.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zoneghost7 pushed a commit to WalkingWithGiants/code-review-graph that referenced this pull request Apr 9, 2026
…irth8205#26)

PostEdit and PostGit are not valid Claude Code hook event types and
cause a validation error that prevents the plugin hooks from loading.

The valid event type is PostToolUse. Replace both entries with a single
PostToolUse entry using matcher "Write|Edit|Bash":
- Write/Edit tool calls cover file modifications (previously PostEdit)
- Bash tool calls cover git commits (previously PostGit with "commit" matcher)

The update command is idempotent so triggering on all Bash calls is safe.

Fixes tirth8205#25

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
zoneghost7 pushed a commit to WalkingWithGiants/code-review-graph that referenced this pull request Apr 9, 2026
Replace stale PostEdit/PostGit references with PostToolUse (Write|Edit|Bash)
in architecture.md, FEATURES.md, and LLM-OPTIMIZED-REFERENCE.md.

Co-Authored-By: Claude Opus 4.6 (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

Development

Successfully merging this pull request may close these issues.

hooks.json uses invalid event types PostEdit and PostGit

2 participants