Skip to content

Use systemMessage instead of hookSpecificOutput for PostCompact#4

Open
vipuldelwadia wants to merge 1 commit intobradwindy:mainfrom
vipuldelwadia:fix/post-compact-hook-schema
Open

Use systemMessage instead of hookSpecificOutput for PostCompact#4
vipuldelwadia wants to merge 1 commit intobradwindy:mainfrom
vipuldelwadia:fix/post-compact-hook-schema

Conversation

@vipuldelwadia
Copy link
Copy Markdown

PostCompact is not a valid hookEventName inside hookSpecificOutput — Claude Code only accepts PreToolUse, UserPromptSubmit, and PostToolUse there. Using systemMessage at the top level is the correct way to inject context after compaction, and avoids the "Hook JSON output validation failed" error.

…ompact

PostCompact is not a valid hookEventName inside hookSpecificOutput — Claude
Code only accepts PreToolUse, UserPromptSubmit, and PostToolUse there.
Using systemMessage at the top level is the correct way to inject context
after compaction, and avoids the "Hook JSON output validation failed" error.

Co-Authored-By: Claude Sonnet 4.6 <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.

2 participants