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]: PullRequestSyncReactor sweeps send the same linked PRs many times over, so one sweep costs 16-100 GraphQL calls instead of ~7 #18295
T3 Code (Alpha) 0.0.45, macOS, a single desktop client and no remote clients connected.
Setup
About 156 open pull requests linked across 9 active threads, all on github.com and all reachable by the server's credential. None are stale or NOT_FOUND, which I checked against the REST API.
Default settings. sidebarAutoSettleAfterDays is null and every thread was active the same day.
What I measured
In server.trace.ndjson, 389 of ~420 GitHubGraphQlBudget.query spans over 16 minutes sat under PullRequestSyncReactor.syncGroup within sweep. Per sweep:
sweep start
duration
groups
GraphQL calls
1
65 s
159
16
2
278 s
159
56
3
79 s
159
100
4
18 s
183
55
5
57 s
160
92
With 25 aliases per PullRequestSummaries call, 159 groups should take about 7 calls.
From outside the app, sampling the gh api graphql … PullRequestSummaries child processes gave 234 calls in 4 minutes. They carried 25 aliases each and covered only 158 distinct PRs, so each PR was read about 37 times in 4 minutes. A 30-minute sample averaged ~40 calls/min, about 2400/h.
Cost is 1 point per call (rateLimit { cost }). That is ~48% of the account's 5000/h GraphQL budget, and with other tools on the same account the budget ran out.
Expected behavior
One sweep reads each due linked PR once, which is about ceil(due PRs / 25) GraphQL calls a minute.
Possible causes (unverified)
DETAIL_CACHE_CAPACITY = 128 is smaller than the number of linked open PRs. With LRU eviction a full sweep may evict its own entries, so later reads in the same sweep or the next one miss the cache.
SUMMARY_BATCH_WINDOW (10 ms) can be missed under load when reads first go through the persisted cache and lock, which splits a sweep into many batches.
executeRaw counts were above GraphQlBudget.query counts in two sweeps (109 vs 100, 116 vs 92). That may mean per-PR fallback reads after a failed batch, but the "batched pull request summary read failed" debug line did not appear.
Impact
Agent workflows that poll GitHub on the same account get rate-limited. There is no setting to lower the PR sync rate. The interval is hardcoded, and auto-settle doesn't help while threads are active.
On main, the sync reactor reads a sweep's groups together so they share summary batches. If you still see far more than ceil(due PRs / 25) GraphQL calls per sweep on the nightly, comment with a fresh server.trace.ndjson excerpt and we'll reopen the investigation. Related: #13496, #17799.
Activity
juliusmarminge commentedon Oct 11, 2026
Note
Grok responding on behalf of Julius.
This path has been rewritten since 0.0.45 (released Oct 2), so please retest on the latest nightly (v0.0.46-nightly.20261011 or newer).
Merged since your build:
gh api graphqlchild processes. The 10 msSUMMARY_BATCH_WINDOWyou measured is gone.GitHubApidirectly.On main, the sync reactor reads a sweep's groups together so they share summary batches. If you still see far more than ceil(due PRs / 25) GraphQL calls per sweep on the nightly, comment with a fresh
server.trace.ndjsonexcerpt and we'll reopen the investigation. Related: #13496, #17799.