Document prompt-based stop hooks issue and update templates#144
Merged
Document prompt-based stop hooks issue and update templates#144
Conversation
…lates Prompt-based stop hooks (type: prompt for Stop/SubagentStop events) do not currently work in Claude Code. This change: 1. Updates AGENTS.md with prominent warning and reference to issue #20221 2. Removes prompt hook generation from skill-job-step.md.jinja template 3. Updates template to use sub-agent review for quality validation instead 4. Documents the limitation in hooks.md and hooks_system.md When Claude Code fixes this issue (see github.com/anthropics/claude-code/issues/20221), these changes should be reversed to re-enable prompt-based stop hooks.
Disables prompt-based stop hooks due to upstream bug and uses sub-agent review pattern for quality validation instead. - Remove prompt hook generation from jinja templates - Add sub-agent review instructions for quality_criteria - Update tests to reflect new behavior (prompt hooks not generated) - Add test for script-type hooks (still generated)
416f1ec to
729edcb
Compare
Add inline comments after endif/endfor tags to clarify what each
closing tag corresponds to. Use {#- prefix for whitespace control.
c6633be to
bbbe4ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR documents a critical issue with prompt-based stop hooks in Claude Code and updates all documentation and templates to reflect the current limitations. Prompt-based hooks (
type: prompt) for Stop and SubagentStop events do not currently work properly, so templates and guidance have been updated to use alternative approaches.Key Changes
hooks.mdandhooks_system.mddocumenting the prompt-based stop hooks issue with reference to GitHub issue #20221skill-job-step.md.jinja) to:AGENTS.md) to instruct template authors not to use prompt-based stop hooks and to use sub-agent review pattern insteadImplementation Details