[Bug]: PR watch never wakes again after an early check failure, so threads wait forever #30530
Area#
apps/server
Steps to reproduce#
- Have an agent open a PR and call
watch_pull_requeston a repository with no required checks. - One check fails early while the others are still running.
- 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.
- 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.
The1UNeed(GitHub profile, opens in a new tab) linked this to #30531
tanstack-source added labelsbug
Note
🤖 Claude Opus 5.5 responding on behalf of jahands
Still happening on
main@ 49c3ab8632, but the symptom has changed. Since the watch started trackingchecksPending, the thread no longer sits in "Waiting". When the last check finishes, it leaves Working without a word. Its last message still says the agent is waiting on CI, so the thread looks abandoned instead of done.Timeline from today. The times are UTC and come from GitHub's check runs on the PR's head commit,
14b1038:Time Event 07:25:58 CodeQL fails with two alerts that are already open on main, in files the PR doesn't touch. The watch wakes the agent with "checks failed".07:26 The agent says the alerts are upstream and that it's still waiting on the other checks. The thread stays in Working, which is correct because Browser Tests, Tests and 8 E2E shards are still running. 07:35:10 The last check finishes. Everything except CodeQL passes. No wake is sent, checksPendingbecomesfalse, and the thread leaves Working.After that, the composer still shows "Running · Watching pull request #2" with a Stop button, because the watch is still on for comments, pushes and the merge. You can't tell from the thread that CI finished.
I reproduced it against
evaluatePullRequestWatch. Given a watch withchecksPending: trueand checks for CodeQL (failure, already reported), Browser Tests (success) and Typecheck (success), it returnschanges: []andnext.checksPending: false.Suggested fix: when
checksPendingchanges fromtruetofalseand the only failures are ones already reported, wake the agent once with a "checks finished, still failing: …" change, so it can close out the PR. Separately, the background-work bar labels any task that isn't being waited on as "Running". For a watch whose checks are done, it should say what the watch is actually waiting for.Fixed by #39596, now on main: After an early check failure, the watch now wakes the agent once every remaining check finishes, including when the repository has no required checks.
juliusmarminge closed this
Sign in to join this conversation.
Note
Written by
Claude Fable 5.2on behalf of AdamThe same bug happened today on 0.1.9, the latest stable release. It was a live GitHub PR with real CI and the normal two-minute sweep. This issue describes a repository with no required checks. In this incident the check that failed first is a required check, so both variants are confirmed.
Environment#
claude-fable-5-2.What happened#
All times are UTC on 2026-11-14. They come from the thread history,
server.trace.ndjsonand the check run timestamps of GitHub.[C2] Check labelsfails on the new head. It is a required check that fails until a person adds a label.[T1]checks are still running. The thread gets the wake "checks failed, new comments".Successand send no wake.The watch stayed on. The user reported that the thread still hangs although the checks are complete.
Evidence#
Evaluator replay with the data of this incident#
I imported the unmodified
apps/server/src/orchestration-v2/pullRequestWatch.tsfrom four revisions. I calledevaluatePullRequestWatchwith the stored watch and the real check runs of this PR. The only stub iseffect/DateTime, which the evaluator calls only when the head moves. I rebuilt the check list of the 08:55:22 sweep from thestartedAtandcompletedAtvalues of GitHub.The table shows the
changesthat each revision returns.v0.1.9at24e77473ecmainat2fa77fbf559c0ae214c7cd94f5c0e6checks-failedchecks-failedchecks-failedchecks-failedchecks-finishedchecks-failed[C2] Check labelspassingchecks-passedchecks-passedchecks-passedchecks-passedSo the bug is present on 0.1.9 and on
mainfrom 2026-11-14T09:08Z. Both open fix PRs send exactly one more wake for this required-check case. I tested only the evaluator of the two PR heads. I did not run a server built from them.One more result applies to both PRs. I also replayed the watch as 0.1.9 stored it, with
owedChecks: [], against the finished checks. Both PR evaluators return no changes there. A watch that already missed the wake before an upgrade stays silent for that head.What #33214 changes#
#33214 is on
mainand not in 0.1.9. Onmainthe same read that returns no changes also changeschecksPendingfromtruetofalse. According to the description of #33214, the thread then leaves Working and returns to the inbox. I did not run a nightly, so I have not confirmed that in the UI.The agent still gets no wake. In this incident the agent told the user that it would act when the remaining checks finish. With #33214 the thread would look finished, and that action would still never happen.
Steps to reproduce the required-check variant#
Expected: one wake that says all checks have finished and names the check that is still failed. Actual: no wake.
Related#
No source patch, database write or server restart was applied. Investigated through T3 Code triage.