Repository navigation
fix(gh): make stop hook block once per user turn - #29
Merged
Merged
Conversation
- Pass through the stop hook when stop_hook_active is true - Allow turn to end after a single stop hook reminder - Update skill docs to reflect one-turn-end-per-user-turn behavior The GitHub review-pr stop hook previously blocked every turn end attempt while the closeout state was armed, potentially causing an infinite loop of blocking messages. This update checks the stop_hook_active flag to ensure that the hook blocks at most once per user turn, allowing subsequent attempts within the same turn to proceed. Corresponding documentation in review-pr and create-pr skills and references has been synchronized to clarify this behavior. Co-Authored-By: DeepSeek V4 Flash <noreply@deepseek.com> Co-Authored-By: Git Agent <noreply@git-agent.dev>
Owner
Author
|
Summary of the review cycle on this PR. Changes made
Review findings and resolution
All CI checks are green and no comments remain worth adopting. This PR is ready to merge. |
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.
What
Makes the
githubplugin's Stop hook (closeout-stop.sh) block at most once per user turn instead of on every turn end, fixing the repeated stop-hook loop the plugin hit when the closeout state was armed.Why
The hook previously blocked every turn-end while
.git/review-pr-closeout.jsonexisted, until Claude Code's 8-consecutive-block cap forced a stop. A model mid-closeout would get the same reminder injected repeatedly across the turn.Changes
stop_hook_active(the documented anti-loop pattern): when the turn is already continuing from a stop-hook block, exit cleanly so the turn ends after the single reminder..git/review-pr-closeout.jsondeletion escape hatch.review-pr/SKILL.md,create-pr/SKILL.md, andreferences/closeout.mdfrom "every turn end is blocked (8-cap)" to "one turn-end per user turn is blocked."Review cycle
1 comment triaged over 1 round (Code Terrier): 1 rejected — its
additionalContext-not-honored claim was based on a staleautoresearchcomment and is refuted by current docs. All CI green.Full breakdown: #29 (comment)
Verification
stop_hook_active=true, subagent, no-state, corrupt-state, non-numeric-PR all pass (fail open); first-blocks/second-passes confirms one reminder per turn.stop_hook_active=true) → silent exit 0.python3 plugin-optimizer/scripts/validate-plugin.py github/→ PASSED.