[Bug]: PR watch never wakes again after an early check failure, so threads wait forever#30530

opened8d agobyTThe1UNeed

Area

apps/server

Steps to reproduce

  1. Have an agent open a PR and call watch_pull_request on a repository with no required checks.
  2. One check fails early while the others are still running.
  3. The watch wakes the agent with "checks failed". The agent sees the other checks are still running, says it will continue once they finish, and ends its turn, as the wake message tells it to.
  4. The remaining checks finish, all passing.

Expected behavior

The watch wakes the agent once more when the remaining checks finish, so it can act on the final result: rerun a flaky job, report, or merge.

Actual behavior

No further wake comes. The thread shows "Waiting" indefinitely. It moves only on a new push, a new comment, or a conflict.

In evaluatePullRequestWatch (apps/server/src/orchestration-v2/pullRequestWatch.ts), checks-failed fires only for newly failed checks. checks-passed and the owed "settled" wake both require zero failures, so after one early failure, nothing reports that the run finished.

Impact

Major degradation or frequent failure

In one project, a CI job that failed on main made every PR hit this path. Five watched threads sat in "Waiting" for 19 to 23 hours after their CI runs had finished.

Version or commit

T3 Code Nightly 0.1.7-nightly.20261104.4151; the code is unchanged on main @ dd69b316.

Environment

macOS, T3 Code desktop nightly, Claude Code provider, GitHub PRs.

Workaround

Send the thread a message by hand once CI finishes.