You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Pull Requests list is empty on GitHub Enterprise Server (GHES) because GraphQL documents include github.com-only stack/stackEntry fields #20436
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
Sign in to a GitHub Enterprise Server (GHES) host with gh auth login --hostname <ghes-host>.
Open a project whose remote is a repository on that GHES host.
Open the Pull Requests menu/page, or link a PR from that host to a thread.
Observe the list or summary.
Expected behavior
Pull requests from the GHES repository are listed and their summaries load. Stack data is just left out on hosts that don't support stacked PRs.
Actual behavior
The Pull Requests list is empty for GHES repositories. PR summary reads fail with PullRequestOperationError: ... GitHub returned an unreadable getPullRequestSummary response.
Cause: PullRequestRow (used by PullRequestSearch and PullRequestList) and PullRequestSummary always contain:
stack @include(if: $stacks) { number size baseRefName }
stackEntry @include(if: $stacks) { position }
@include(if: false) only skips a field at execution time. GraphQL validates the whole document against the schema first. GHES has no stack/stackEntry on PullRequest, so it rejects the query even when $stacks is false. It returns HTTP 200 with errors and no data, and T3 Code shows that as an empty list or an "unreadable" response.
Introduced by #19224, which moved these fields from string-built queries to fixed documents behind @include. Related but different fields: #17232 / #19405. Stacks REST 404 on GHES: #14458.
Suggested fix: use separate documents (or fragments chosen in code) for github.com and other hosts, so Enterprise requests never contain stack/stackEntry. PullRequestStackMembership should also only be sent to github.com.
Impact
Minor bug or occasional failure
Version or commit
0.1.1-nightly.20261016.3218
Environment
Win 11, GitHub Enterprise Server 3.21.4, T3 Code Desktop Nightly
Logs or stack traces
the `Field 'stack' doesn't exist` errors and the "unreadable getPullRequestSummary" error, with host names left out.
Screenshots, recordings, or supporting files
No response
Workaround
none in T3; currently have to view the PRs in the browser on the GHES host.
Confirmed on main: this is a regression from #19224, which moved the PR queries into fixed .graphql documents. Before that, stack membership was a separate query that only ran on github.com.
The code is meant to handle Enterprise Server here: $stacks is set to false off github.com, and the documents say "Enterprise Server has no pull request stacks". But @include(if: $stacks) only skips a field when the query runs. GHES checks the whole document against its schema first, so stack/stackEntry fail that check in:
pullRequestListings.graphql: the PullRequestRow fragment (L13-20), used by both search and list
PullRequestStackMembership (L68-79) has the same fields, so it should also only be sent to github.com.
Some of this overlaps with #17232 (other fields GHES doesn't support, in PR details), and #14458 covers the REST stacks endpoint. But this is a separate regression with a separate fix: stack fields need to stay out of Enterprise requests entirely. So we're keeping it open as its own bug and linking it to #17232. Thanks for tracking down the exact cause.
I can't give outside access to our GHES instance (it's a corporate server), but I verified the fix against it directly.
Environment: GitHub Enterprise Server 3.21.4, authenticated with gh auth login --hostname <ghes-host>.
I took the per-operation GraphQL documents (each operation plus only the fragments it uses, as the generated client sends them) from current main and from #20531 at 4bdb33d3e1. I sent them to a real repository with gh api graphql --hostname <ghes-host>:
❌ Field 'stack' doesn't exist on type 'PullRequest', Field 'stackEntry' doesn't exist…, no data
✅ rows returned, no errors
PullRequestList
❌ same errors, no data
✅ rows returned, no errors
PullRequestSummary
❌ same errors, no data
✅ PR loaded, no errors
PullRequestStackMembership
❌
❌ (expected: github.com only)
This confirms the cause on a live GHES: @include(if: false) doesn't help because the server validates the whole document first. With #20531, the Enterprise list, repository-list fallback and summary queries all validate and return data. PullRequestStackMembership and the *WithStacks variants still fail on GHES, so they must stay github.com-only, as the PR intends.
If it would help, I can also test a build of #20531 in the desktop app. I'm happy to run any other queries or builds you'd like checked.
Another confirmation, on a stable desktop build this time.
Environment
T3 Code (Beta) desktop, 0.1.3 stable, Windows 11 (x64), local server
GitHub Enterprise Server 3.21.7, gh 2.95.0 logged in with gh auth login --hostname <ghes-host> (scopes: repo, read:org)
What happens
The Pull Requests list is empty for repositories on the GHES host. listPullRequestsByHead succeeds, but getPullRequestSummary fails every time:
GitHubPullRequestReadError: GitHub returned an unreadable getPullRequestSummary response.
[cause]: GraphQLClientError: PullRequestSummary: ResponseError:
Field 'stack' doesn't exist on type 'PullRequest';
Field 'stackEntry' doesn't exist on type 'PullRequest';
Variable $_0_stacks is declared by PullRequestSummary but not used
This matches the diagnosis above. #20531 would fix it for us too.
Something that may trip up other GHES users: at first this bug was hidden behind a TLS failure. Our GHES certificate is issued by a private corporate root CA. gh trusts it through the Windows certificate store, but the T3 server (Node) doesn't use that store. Every request failed with self signed certificate in certificate chain, and the error T3 showed was just Could not reach GitHub at <ghes-host>. Pointing NODE_EXTRA_CA_CERTS at an exported copy of the root CA and fully restarting the app fixed the TLS part. Only then did the stack/stackEntry error above appear. If the error said the certificate wasn't trusted, instead of "Could not reach GitHub", this would have taken much less time to figure out. (Probably related: #16703.)
Diagnosed via t3 triage with Claude Code (Claude Opus 5.5).
Activity
juliusmarminge commentedon Oct 17, 2026
Note
Grok responding on behalf of Julius.
Confirmed on main: this is a regression from #19224, which moved the PR queries into fixed
.graphqldocuments. Before that, stack membership was a separate query that only ran on github.com.The code is meant to handle Enterprise Server here:
$stacksis set to false off github.com, and the documents say "Enterprise Server has no pull request stacks". But@include(if: $stacks)only skips a field when the query runs. GHES checks the whole document against its schema first, sostack/stackEntryfail that check in:pullRequestListings.graphql: thePullRequestRowfragment (L13-20), used by both search and listpullRequestBatches.graphql:PullRequestSummary(L47-54)PullRequestStackMembership(L68-79) has the same fields, so it should also only be sent to github.com.Some of this overlaps with #17232 (other fields GHES doesn't support, in PR details), and #14458 covers the REST stacks endpoint. But this is a separate regression with a separate fix: stack fields need to stay out of Enterprise requests entirely. So we're keeping it open as its own bug and linking it to #17232. Thanks for tracking down the exact cause.
Ossiam commentedon Oct 22, 2026
I can't give outside access to our GHES instance (it's a corporate server), but I verified the fix against it directly.
Environment: GitHub Enterprise Server 3.21.4, authenticated with
gh auth login --hostname <ghes-host>.I took the per-operation GraphQL documents (each operation plus only the fragments it uses, as the generated client sends them) from current
mainand from #20531 at4bdb33d3e1. I sent them to a real repository withgh api graphql --hostname <ghes-host>:mainPullRequestSearch(statsfalse and true)Field 'stack' doesn't exist on type 'PullRequest',Field 'stackEntry' doesn't exist…, nodataPullRequestListdataPullRequestSummarydataPullRequestStackMembershipThis confirms the cause on a live GHES:
@include(if: false)doesn't help because the server validates the whole document first. With #20531, the Enterprise list, repository-list fallback and summary queries all validate and return data.PullRequestStackMembershipand the*WithStacksvariants still fail on GHES, so they must stay github.com-only, as the PR intends.If it would help, I can also test a build of #20531 in the desktop app. I'm happy to run any other queries or builds you'd like checked.
EmanuelMedinaEme commentedon Oct 28, 2026
Another confirmation, on a stable desktop build this time.
Environment
gh2.95.0 logged in withgh auth login --hostname <ghes-host>(scopes:repo,read:org)What happens
The Pull Requests list is empty for repositories on the GHES host.
listPullRequestsByHeadsucceeds, butgetPullRequestSummaryfails every time:This matches the diagnosis above. #20531 would fix it for us too.
Something that may trip up other GHES users: at first this bug was hidden behind a TLS failure. Our GHES certificate is issued by a private corporate root CA.
ghtrusts it through the Windows certificate store, but the T3 server (Node) doesn't use that store. Every request failed withself signed certificate in certificate chain, and the error T3 showed was justCould not reach GitHub at <ghes-host>. PointingNODE_EXTRA_CA_CERTSat an exported copy of the root CA and fully restarting the app fixed the TLS part. Only then did thestack/stackEntryerror above appear. If the error said the certificate wasn't trusted, instead of "Could not reach GitHub", this would have taken much less time to figure out. (Probably related: #16703.)Diagnosed via
t3 triagewith Claude Code (Claude Opus 5.5).