[Bug]: watch_pull_request never wakes the thread when a pull request has no checks#23701

opened1d agobyTtomjn

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

An agent asked to "merge this PR once CI passes" can call watch_pull_request and end its turn. If the pull request never gets any checks, the thread is never woken, so the agent waits for ever and the user has to notice and step in.

  1. In a GitHub repo, add a workflow that skips some paths, for example on: pull_request: paths-ignore: ["docs/**"].
  2. Open a pull request that only changes a file under docs/. No workflow runs, and gh pr checks prints "no checks reported".
  3. In a thread, call watch_pull_request on it and end the turn.

Seen on 2026-10-22 (UTC) in a private scratch repo. I watched four pull requests at the same time. The three with checks woke the thread for their pass or failure. The one with no checks was watched from 14:26:46 until I stopped the watch after 15:11. In that time it woke only once, when another merge made it conflict with main.

Expected behavior

When a pull request has had no checks on its current head for a while, the thread gets one wake saying so, for example "No checks have been reported on abc1234". The agent can then decide whether CI was meant to run.

Actual behavior

An empty check list is treated as "no change", so nothing is ever reported. The comment in apps/server/src/orchestration-v2/pullRequestWatch.ts explains why: "An empty list keeps the last state: a host can answer with one when its check read fails." That protects against a failed read. It also means a pull request that genuinely has no checks looks the same as one whose checks are still pending.

https://github.com/pingdotgg/t3code/blob/60b35a1ee02d717009ff4a3de34de285db9e8a60/apps/server/src/orchestration-v2/pullRequestWatch.ts#L42-L46

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Beta) 0.1.1. Code reference: main @ 60b35a1

Environment

macOS 26.6.1, T3 Code desktop (Beta), Claude Code provider, GitHub PR on github.com

Workaround

Before calling watch_pull_request, confirm that at least one check exists, by polling gh pr checks for a short grace period. If none appear, report that to the user instead of watching.