PR watch stays active after checks pass when the agent hands back without calling unwatch_pull_request #34770
What happened#
An agent opened a PR and called watch_pull_request. CI finished and all checks passed. The watch woke the agent, which wrote a hand-back summary ("ready for review, all 16 checks passed, remains unmerged"). A bot comment (CodeRabbit "fewer than 10 stars" notice) woke it again and it summarized again. Neither turn called unwatch_pull_request. 45+ minutes later the thread still shows Waiting · Watching pull request #7 and stays out of the inbox even though the agent's work is done. To the user it looks like the watch missed CI finishing.
Diagnosis#
The watch did detect CI finishing. Nothing ends the watch once the agent hands back.
- 05:04:39Z wake:
outcome: "completed",#7: checks passed, which started run 3. 05:06:41Z wake:outcome: "updated",#7: new comments, which started run 4. Both runs completed. Nothing is pending. - In
apps/server/src/orchestration-v2/pullRequestWatch.ts,pullRequestWatchMessageuseschecks-passedonly to label the notificationcompleted. The watch continues. It ends only onunwatch_pull_request,PULL_REQUEST_WATCH_WAKE_LIMIT(10 comment-only wakes), or unlink/merge/close. - The only thing that returns the thread after hand-back is the instruction in each wake message ("call unwatch_pull_request first...") plus
PULL_REQUEST_LINKING_INSTRUCTIONS. Codex (gpt-6.1-terra) ignored it on both wakes.
So a passed-checks watch relies entirely on the model following the unwatch instruction. When it doesn't, the thread stays parked in Waiting until the PR changes or a human clicks Stop. A reboot after run 4 was not involved.
Possible directions: end the watch when a wake turn after a completed outcome ends with no further action; have the server end the watch on checks-passed unless the agent re-arms it; or show a "checks passed, agent idle" hand-back state.
Steps to reproduce#
- On a Codex thread (
gpt-6.1-terra, extra-high), have the agent create a PR and callwatch_pull_request. - Let all CI checks pass with no required review.
- The watch wakes the agent with "checks passed". The agent summarizes and ends its turn without
unwatch_pull_request. - Optionally, let a bot comment. The agent wakes, summarizes, and still doesn't unwatch.
- The thread stays "Waiting · Watching pull request" indefinitely and does not return to the inbox.
Version#
0.1.10-nightly.20261111.4544 (desktop Nightly, local server); triage CLI 0.1.10-nightly.20261112.4564
Environment#
Arch Linux x64 (kernel 7.2.15), Node v26.12.1, desktop app + local server, Codex driver gpt-6.1-terra
Evidence#
runs (thread 6937b329...):
ordinal 3 completed 05:04:39.516Z -> 05:05:01.388Z
ordinal 4 completed 05:06:41.990Z -> 05:06:54.145Z
wake 05:04:39Z: {source:{kind:"monitor",pullRequest:{number:7,watchStartedAt:"2026-11-12T04:58:43.077Z",headSha:"1d8a59d..."}},outcome:"completed",summary:"#7: checks passed"}
wake 05:06:41Z: {...headSha:null},outcome:"updated",summary:"#7: new comments"
run 3 final: "Sync PR #7 is now ready for review, and all 16 checks passed. It remains unmerged; ..."
run 4 final: "CodeRabbit's comment reports that it did not run an automatic review ... PR #7 remains ready for review"
-> no unwatch_pull_request in either run; UI: "Waiting · Watching pull request #7"
Related issues#
#19508 (closed, moved to Ideas) named the unwatch_pull_request call as the workaround; this shows that workaround is unreliable. Different issues: #22183, #25160 (watch ends silently), #25497 (watch never wakes).
Fix applied or workaround#
Nothing was applied. Workaround: click Stop on the watch, or tell the agent to unwatch.
Filed by#
Claude Code (claude-opus-5-5) via t3 triage
sheepbun(GitHub profile, opens in a new tab) added labelsvia-triage
tanstack-source added labelsbug
Fixed by #33214, now on main: After all PR checks pass and the agent finishes its reply, the thread now returns to the inbox without requiring unwatch_pull_request, while the watch remains available for later comments.
juliusmarminge closed this
Sign in to join this conversation.
Screenshots: PR checks passed, thread still Waiting,