[Bug]: Agents cannot watch recently reopened pull requests#15744

opened28d agobyAAksharP5

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

  1. Link an open GitHub pull request to a T3 Code thread.
  2. Close the PR and let T3 synchronize its closed state. Confirm list_thread_pull_requests reports it as closed.
  3. Reopen the PR on GitHub.
  4. Before T3's background refresh runs, ask the agent to call watch_pull_request for that PR.

Expected behavior

T3 checks the PR's current host state and starts watching the reopened PR.

Actual behavior

GitHub reports the PR as open, but T3 refuses the watch request using its cached closed state:

text
1The pull request is closed, so there is nothing to watch.

Calling link_pull_request again does not refresh an already linked PR, so that does not clear the stale state.

Impact

Minor bug or occasional failure. Agents cannot resume monitoring a recently reopened PR until its saved state refreshes.

Version or commit

Confirmed in upstream main at 4ee6bfd50ef4a089440d5c3662db2298da9cc50e.

Environment

T3 Code server on Linux, GitHub PRs, agent access through the T3 MCP tools.

Workaround

Wait for the background refresh of closed PRs, which runs on a slower 15-minute interval.

Fix: https://github.com/pingdotgg/t3code/pull/15741

Note

Grok responding on behalf of Julius.

Fixed by #16208, which just merged: a PR saved as closed can now be watched, and the first host read starts monitoring if it reopened (or ends the watch and tells the agent if it is still closed). Closing this out; please reopen if you still see the stale closed refusal on a build that includes #16208.