Summary
The pretool-pr-review-reminder PreToolUse hook injects the gh-version (≥2.88) + "add Copilot as reviewer via gh pr edit --add-reviewer" guidance on every gh pr create. In a multi-PR autonomous session (e.g. a cross-repo cascade) the same ~12-line <IMPORTANT> block is shelled into context once per PR — observed 7× in a single session. That is wasted context for advice the agent already has.
Ask
Emit the reminder once per session, deduped like hooks/session-start does (.claude/autodev-state/session-start-seen + per-session marker):
- First
gh pr create in a session → emit + record a pr-reminder-seen marker keyed by the session (transcript basename).
- Subsequent
gh pr create in the same session → exit 0 silently.
- Reset after compaction: the
pre-compact-snapshot (PreCompact) hook clears the marker so the reminder re-emits once after a compaction (the post-compaction context lost the earlier reminder).
Acceptance
- Multiple
gh pr create in one immediate session → reminder emitted exactly once.
- A
gh pr create after a PreCompact → reminder emitted once more.
- Regression test covering both (dedup + post-compact reset).
Source: observed this session (user report).
Summary
The
pretool-pr-review-reminderPreToolUse hook injects the gh-version (≥2.88) + "add Copilot as reviewer viagh pr edit --add-reviewer" guidance on everygh pr create. In a multi-PR autonomous session (e.g. a cross-repo cascade) the same ~12-line<IMPORTANT>block is shelled into context once per PR — observed 7× in a single session. That is wasted context for advice the agent already has.Ask
Emit the reminder once per session, deduped like
hooks/session-startdoes (.claude/autodev-state/session-start-seen+ per-session marker):gh pr createin a session → emit + record apr-reminder-seenmarker keyed by the session (transcript basename).gh pr createin the same session → exit 0 silently.pre-compact-snapshot(PreCompact) hook clears the marker so the reminder re-emits once after a compaction (the post-compaction context lost the earlier reminder).Acceptance
gh pr createin one immediate session → reminder emitted exactly once.gh pr createafter a PreCompact → reminder emitted once more.Source: observed this session (user report).