[Bug]: watch_pull_request does not wake when review threads/comments remain unresolved under required resolution rules #17703
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Related but different:
- #16829: Wake storms on comment bursts
- #16924: Waking on every check state change
- #17207: Dedupe ordering on GitHub status check rollup
Area#
apps/server (orchestration-v2/pullRequestWatch.ts)
Steps to reproduce#
- In a GitHub repository, configure a branch protection ruleset requiring
required_review_thread_resolution: true. - Open a pull request and start a watch using
watch_pull_request. - CI checks run and pass (
status === "success"). - An automated reviewer (e.g. GitHub Copilot code review, or another review bot) leaves inline review comments / opens a review thread with suggestions.
- End turn to let
watch_pull_requestmonitor PR readiness for auto-merge.
Expected behavior#
When an agent watches a pull request to merge when ready, watch_pull_request should:
- Either wake when review threads are opened / remain unresolved while checks pass, signaling that the PR is blocked by unresolved conversations; OR
- Wake when the PR becomes mergeable vs blocked by repository rulesets (
mergeable_state, ruleset evaluation, or unresolved conversation blocker), so the agent knows action is required to resolve threads before merge can proceed.
Actual behavior#
evaluatePullRequestWatch in apps/server/src/orchestration-v2/pullRequestWatch.ts only tracks:
- New comments/reviews created after the watch started. If comments were posted concurrently with or before the watch started, or if comments remain unresolved, no wake triggers.
- Check statuses (
all-checks-passed/checks-failed). Once the CI checks pass, the watch sendschecks-passed, but because unresolved review threads block GitHub's merge policy, an agent attempting to merge or waiting for auto-readiness is stuck waiting indefinitely unless manual user intervention or polling occurs.
Impact#
Agents relying on watch_pull_request (as mandated by system instructions) hang indefinitely on repositories that enforce unresolved thread resolution rulesets, believing CI checks are the only gate for merge readiness.
Environment#
T3 Code, GitHub repository with branch ruleset required_review_thread_resolution: true.
Sign in to join this conversation.