Skip to content

Fix hooks to match current Claude Code hook API specification#3

Open
bvdr wants to merge 1 commit intomainfrom
claude/assess-notifications-issue-977lA
Open

Fix hooks to match current Claude Code hook API specification#3
bvdr wants to merge 1 commit intomainfrom
claude/assess-notifications-issue-977lA

Conversation

@bvdr
Copy link
Owner

@bvdr bvdr commented Feb 23, 2026

  • Replace undocumented "behavior":"ask" in PermissionRequest hooks with
    clean exit (no stdout = fall through to default permission dialog)
  • Use last_assistant_message field in Stop hook (v2.1.47+) with transcript
    parsing fallback for older versions
  • Update CLAUDE.md: fix behavior values, add PreToolUse/Stop response
    formats, correct hooks.json example to match actual schema, list all
    available hook events

https://claude.ai/code/session_01X1GG4j8FQ1bhJ8gA8H6ikj

- Replace undocumented "behavior":"ask" in PermissionRequest hooks with
  clean exit (no stdout = fall through to default permission dialog)
- Use last_assistant_message field in Stop hook (v2.1.47+) with transcript
  parsing fallback for older versions
- Update CLAUDE.md: fix behavior values, add PreToolUse/Stop response
  formats, correct hooks.json example to match actual schema, list all
  available hook events

https://claude.ai/code/session_01X1GG4j8FQ1bhJ8gA8H6ikj
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.

2 participants