Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate. [Bug]: PR detail/activity is re-fetched for every displayed PR on each focus, visibility change and 5-minute tick (merged PRs included), exhausting the GitHub GraphQL quota #13496 is about renderer re-fetches on focus. [Bug]: PR sync reads pull requests GitHub cannot find on every sweep, even on settled threads #17799 is about NOT_FOUND links on settled threads. This one is about the server-side sweep itself, with every link reachable and open.
Area
apps/server: PullRequestSyncReactor / pull request summary batching (GitHub CLI integration)
Version
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.
sidebarAutoSettleAfterDaysis null and every thread was active the same day.
What I measured
-
In
server.trace.ndjson, 389 of ~420GitHubGraphQlBudget.queryspans over 16 minutes sat underPullRequestSyncReactor.syncGroupwithinsweep. 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
PullRequestSummariescall, 159 groups should take about 7 calls. -
From outside the app, sampling the
gh api graphql … PullRequestSummarieschild 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 = 128is 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.executeRawcounts were aboveGraphQlBudget.querycounts 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.
Workaround
None, apart from archiving threads.
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.t3dotgg commentedon Oct 21, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. This is fixed on main in #16320, #16270, #16760 and #16982. Please test on the nightly built from main on 2026-10-21, or on the next stable release. If the problem still occurs there, please open a new issue that links to this one, with your version and steps to reproduce it.