Repository navigation
Description
Before submitting
- I searched existing issues. Related reports are linked below.
- I included observed events, a reproduction procedure, and a working workaround.
Area
apps/server
Steps to reproduce
- Open a Bitbucket Cloud PR with commit build statuses. In our case, an external review service posts
ai-review/claudeandai-review/codex. - Have the owning T3 thread call
watch_pull_requestwhile those statuses are in progress, then end the agent turn. - Let the reviews finish without further PR comments or user prompts.
- Check whether the thread wakes for the review results. When T3 stops the watch, compare its result with
bkt pr view <id> --workspace <workspace> --repo <repo> --jsonandbkt pr checks <id> --workspace <workspace> --repo <repo> --jsonon the same machine.
Expected behavior
T3 reads the Bitbucket PR and its latest-head statuses and wakes the owning agent when reviews finish. If host access is unavailable, surface the underlying provider/authentication error promptly so the agent can choose another supported wait mechanism.
Actual behavior
The thread waited for the review results until T3 emitted:
#<pr>: stopped watching, could not read it
A direct bkt read 16 seconds later succeeded: the PR was OPEN on the same head and both review statuses were SUCCESSFUL. The watcher did not deliver the expected successful-review wake. Another Bitbucket PR thread had the same stopped-watching notification.
Impact
Major degradation or frequent failure. Assigned tasks remain waiting after AI reviews finish, requiring later manual/nightly recovery.
Version or commit
The server currently reports t3 v0.1.2. The exact version when the original watch was registered is unknown. This report does not claim a fresh reproduction on upstream main.
Environment
Ubuntu Server 24.04 x86_64, headless T3 server, Codex thread, private Bitbucket Cloud repository. bkt is authenticated separately and can read the PR/statuses. Private repository names, account identifiers and local thread links are omitted.
Evidence
Sanitized historical thread activity:
- 2026-11-04 16:40:13 UTC:
bkt pr checksshowed bothai-review-claudeandai-review-codexas INPROGRESS on head3c6ce255f61f; the owner ended its turn waiting for bot results. - 2026-11-06 06:24:30 UTC: T3 notification:
#<pr>: stopped watching, could not read it. - 2026-11-06 06:24:45 UTC:
bkt pr viewshowed OPEN, same head;bkt pr checksreturned both expected reviewer statuses as SUCCESSFUL and their review-comment links. - A second Bitbucket PR thread also contains the same notification.
Underlying cause is unverified: working CLI access does not prove T3's separately configured host credentials are valid. We did not recover a provider error for the failed reads from retained trace logs, so this report does not assert an authentication, rate-limit, or decoding cause.
Related issues
- [Bug]: watch_pull_request ends the watch after 8 consecutive failed reads, even when the failures are transient network errors #18894: a watcher gives up after consecutive failed reads, reported for transient GitHub network failures. Here the affected host is Bitbucket and the underlying read error is unknown.
- [Bug]: watch_pull_request misses "checks passed" after a push on Bitbucket because the head SHA is never reported #16301: missing Bitbucket head SHA can suppress subsequent successful-check wakes. That report concerns a readable PR; this incident explicitly ends with a read-failure notification.
Workaround
Use one bounded background bkt poll pinned to the PR head. Require both expected reviewer keys; empty/missing statuses remain pending. In T3 Claude Code, register the actual Bash background-command task ID with t3_background_wait. We verified a historical thread in which that registration matched, woke on completion, and returned both SUCCESSFUL review results. For Codex, follow the command session to completion because t3_background_wait is Claude-only. Reread the current head, comments and merge gate after the wait. No T3 runtime patch was applied.
Report prepared by Codex (gpt-6.1-sol), at the user's request.
Activity
juliusmarminge commentedon Nov 6, 2026
Thanks for the detailed timeline. This is fixed on main by cc59f99 (#29450), which first shipped in v0.1.7. Your server reports v0.1.2.
Up to v0.1.6, a PR watch stopped after any 8 failed reads in a row, at the 2-minute sweep interval. That covers network errors and Bitbucket 5xx responses. So a host or network outage of about 16 minutes produced
#<pr>: stopped watching, could not read it, even though the PR could be read again moments later. Both of your Bitbucket watches ending together fits that pattern. Since cc59f99, the watch stays active through those failures and wakes the thread once the checks finish.What I ran:
#8: checks passed.failed, so the watch keeps going. Only HTTP 401 (unauthenticated), HTTP 404 (not-found) and an unreadable saved credential still end it.Closing as fixed. If it happens again on v0.1.7 or later, please reopen with the server log warning
pull request watch check failedfor that PR. Itscausenames the failing request and status.