[Bug]: watch_pull_request ends silently, so the thread never hears of the author's push or reply#22183

opened9d agobyEemanuel-mrkr

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Seen once, on a GitHub PR review thread (times UTC, 2026-10-20):

  1. 05:52:53: the thread calls watch_pull_request on an open PR. It returns watching:true, wasWatching:false.
  2. 05:53:25 and 05:54:22: the thread wakes twice and ends each turn "waiting on the author".
  3. 05:55:39: the thread is settled.
  4. 05:59:07: the author pushes a commit. 05:59:27: the author replies in a review thread. About 06:04: CI goes green on the new head.
  5. 06:58:11: the thread calls unwatch_pull_request. It returns watching:false, wasWatching:false.

Nothing in step 4 woke the thread, and no "stopped watching" notice reached it. The thread's timeline has no item at all between 05:54:37 and the user's next message at 06:57:42.

My guess is that settling the thread (or the end of its turn) dropped the watch, because the watch ended between 05:53 and 05:59 and the settle is the only thing that happened then. I have not confirmed this. Unlike #18894, no notice was sent.

Expected behavior

  • A watch lasts until unwatch_pull_request, a merge or a close. Settling a thread or ending its turn doesn't end it.
  • If anything else ends a watch, the thread gets a notice saying why, as in #18894.

Actual behavior

The watch ended silently. The thread said "Still watching" while nothing was watching, and the author's push and reply waited about an hour, until the user noticed on GitHub.

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Alpha) 0.0.68

Environment

macOS 27.0 (Apple Silicon), T3 Code desktop (Alpha), Claude Code provider, GitHub PR on github.com

Workaround

Our review automation now runs its own 5-minute poll for pushes and replies, and the agent calls watch_pull_request again at the end of every turn that waits on the author.

Synced from GitHub

Second case, and this one rules out settling as the trigger. The thread was never settled.

Review thread on a GitHub PR, 2026-10-20 UTC:

  1. 07:42:53: the thread calls watch_pull_request. It returns watching:true, wasWatching:true. The turn ends at 07:42:56.
  2. 07:49:57: the author pushes. 07:51:46: the author replies on the PR. Neither wakes the thread.
  3. 07:53:26: the user pastes the reply into the thread by hand.
  4. 07:54:33: the thread calls watch_pull_request again. It returns wasWatching:false.

So the watch ended silently sometime between 07:42:56 and 07:54:33, with no notice and no settle. In the first case, the watch did deliver one wake ("checks passed") after its turn ended, so a turn ending doesn't always drop it.