Repository navigation
Description
What happened
"Whenever my agent uses the 'watch pr' tool, it frequently stalls forever even when all checks have completed and whatnot. I have to frequently remind it to check the PR even though it's supposed to be checking it itself."
Diagnosis
When the watch first sees a check failure in the same read where every other check has already finished, it sends a "Checks failed" wake and nothing after it. The wake text looks the same whether other checks are still running or CI is done, so the agent assumes CI is still running, says it is waiting for the remaining checks, and ends its turn. No later wake comes, because nothing is owed.
In evaluatePullRequestWatch (apps/server/src/orchestration-v2/pullRequestWatch.ts, at v0.1.14-nightly.20261130.5492):
- Lines 185-197: the follow-up
checks-finishedwake is owed only when checks were still running at the read that saw the failure (runningtrue setsowedChecks). If that read already sees every check finished,runningis false,owedBeforeis empty and there is no rerun, soowedChecksstays empty andchecks-finishednever fires for this head. - Line 415:
checks-failedrenders as "Checks failed on :" plus the failed checks. It says nothing about whether other checks are still pending. - The reactor reads on a 2-minute sweep (
SWEEP_MINUTESinPullRequestWatchReactor.ts, see [Bug]: watch_pull_request notices check changes only on the 2-minute sweep unless GitHub event streams are enabled #37477), so a failure close to the end of CI is often first seen after CI has finished.
The watch did its part: one wake for one new failure. The stall comes from the agent being unable to tell that this is the last wake. A fix could say so in the wake ("all other checks have finished" vs "N checks still running; T3 Code will wake you when they finish"), or fold the case into checks-finished when the failure is first seen with nothing running.
Steps to reproduce
- On a repository with no required checks, have a CI job that fails partway through a run and finishes within about 2 minutes of the last other check (here, a macOS job that always fails).
- Have the agent push and call
watch_pull_requestwhile checks are pending. - Let the failing job and all other jobs finish between two watch sweeps.
- The watch wakes the agent with only "Checks failed on : - macos ...". The agent replies "Waiting for the remaining checks" and ends its turn.
- No further wake arrives. The watch stays on, with every check finished.
Version
0.1.14-nightly.20261130.5492 (desktop app, local server)
Environment
Windows 11 (10.0.26200) x64, Node v24.22.1, T3 Code Desktop with a local server, Claude Code provider, GitHub PRs, no GitHub event streams (sweep only)
Evidence
# GitHub check runs for the PR head 6317b6e (UTC)
macos failure 07:43:25 -> 07:46:05
windows success 07:43:25 -> 07:46:11
linux-package success 07:46:14 -> 07:47:05 # last check to finish
# Thread messages (statev2.sqlite, orchestration_v2_projection_messages)
07:47:50 WAKE "- Checks failed on 6317b6e: - macos ..." # only change line in the wake
07:48:02 assistant "That's the same known macOS failure ... Waiting for the remaining checks."
# next message in the thread: 892 minutes later, from another thread, not a watch wake
# Stored watch for this PR, still active after CI finished
{"headSha":"6317b6e...","failedChecks":["macos"],"passed":false,"owedChecks":[],
"awaitingApproval":[],"checksPending":false,"wakes":0}
# Control case, same PR, previous head 45aefc2: the failure was seen while linux-package still ran
07:01:43 WAKE "- Checks failed on 45aefc2: - macos ..."
07:03:05 linux-package finishes
07:03:45 WAKE "- Every check has finished on 45aefc2: 7 passed, 1 still failing"Across 31 "checks failed" wakes on this machine since Nov 19, at least three were followed by the user nudging the agent instead of a watch wake (+892, +52 and +46 minutes). The repository's macOS job fails on every PR, so its PRs hit this path often.
Related issues
#30530, #25497 and #28019 fixed the case where other checks are still running when the failure is first seen. This build has that fix, and it works here (control case above). This report is the remaining case: the failure is first seen after everything finished. #37477 (2-minute sweep) makes this race common. #32277 covers reruns that fail again, a different path.
Fix applied or workaround
None applied. Suggested workaround: tell the agent in AGENTS.md / CLAUDE.md to run gh pr checks <n> after a "Checks failed" wake before ending its turn, and to act on the result if nothing is pending.
Filed by
Claude Opus 5.5 (claude-opus-5-5) via Claude Code, through T3 Code triage
Activity