# fix\(server\): refresh linked PRs without a checkout · PR \#17167 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/17167)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: Unavailable fork

Source branch: pixpmusic/fix-no-project-pr-snapshots

Target branch: main

Head commit: bfa28802e25672a283c640a9258b808d3cbaf919

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/17167)

[Commits](https://git.cafe/pingdotgg/t3code/pull/17167/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/17167/diffs?format=markdown)

## Description

---

## Problem

Linked PRs in “No project” scratch threads can remain at “Pull request · Status pending” indefinitely, even when the host can read them through `gh`. `PullRequestService.requireProject` refuses a hosted reference before reading the provider when no registered Git-backed project exists on that host. The same service failure prevents PR watches from reading the linked PR.

Fixes #17166.

## Change

Keep the existing checkout routing first. When no checkout route exists for github.com, bitbucket.org, or codeberg.org, use the selected project's directory and the reference's explicit host and repository to call the registered provider. Preserve the normalized remote used by current upstream caches.

Regression tests cover summary and stack reads without a checkout on all three hosts, matching-checkout preference, missing project directories, hostless references, and unavailable providers. GitLab, Azure, and self-hosted routing retain their existing checkout requirements. GitLab is excluded because its adapter selects the endpoint through the checkout or CLI configuration rather than explicitly targeting the reference's host.

## Scope and approval

This is a focused fix for an obvious failure in the existing linked-PR workflow: the reference already identifies a readable PR, but an unrelated checkout requirement blocks its metadata. It qualifies for CONTRIBUTING.md's focused bug-fix exception.

The change stays in the existing server service, shared by PR sync, PR watches, client RPCs, and MCP tools. Web, desktop, and mobile consume the same persisted snapshots over local, remote, and T3 Connect connections. No client UI, wire contract, provider-agent adapter, or documentation changes are needed.

## Verification

- `vp test run apps/server/src/pullRequest/PullRequestService.test.ts apps/server/src/orchestration-v2/PullRequestSyncReactor.test.ts`: 216 passed on this branch.
- The three new no-checkout tests fail with `PullRequestUnavailableError` against the pinned upstream implementation and pass with the fix.
- `vp run --filter t3 typecheck`: passed.
- Targeted `vp lint`, `vp fmt --check`, and `git diff --check`: passed.
- On the affected MacBook Air, ran `gh pr view 1 --repo pixpmusic/theatrebot --json title,state` through the remote T3 terminal in the scratch directory; it returned the real title and `MERGED`. Both Android and desktop displayed pending metadata before the fix.

The updated server has not been installed on that MacBook Air. Native mobile end-to-end verification was not performed; verification of the fix uses server service and sync-reactor tests.

Model: GPT-6.1 Sol | Harness: Codex in T3 Code

