fix: change agent hook default from PostToolBatch/postToolUse to Stop/stop - #1648
Open
skoshx wants to merge 2 commits into
Open
fix: change agent hook default from PostToolBatch/postToolUse to Stop/stop#1648skoshx wants to merge 2 commits into
skoshx wants to merge 2 commits into
Conversation
…/stop - Change Claude Code hook from PostToolBatch to Stop event - Change Cursor hook from postToolUse to stop event - Remove tool name filtering since stop fires once at session end - Update hook script to use followup_message format for Stop event - Update all tests to reflect new hook behavior - Strip legacy hooks from both new and old event types during install Closes #1647 Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
skoshx
marked this pull request as ready for review
August 13, 2026 23:13
Contributor
Interactive terminal E2ETerminal Control verified the built CLI at
|
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
Changes the default agent hook timing from
PostToolBatch/postToolUsetoStop/stopfor better performance and token efficiency.Problem
On long agent sessions with many uncommitted files, react-doctor was running after every tool batch (Claude) or tool use (Cursor), causing ~4s scans repeatedly throughout the session. This was:
Solution
Install hooks on the
Stop/stopevent instead, which fires once when the agent finishes responding. Benefits:--scope changedalready filters to edited files, so no tool filtering neededChanges
PostToolBatch→StoppostToolUse→stopStopevent (followup_message)Closes #1647