Repository navigation
Description
1. Summary
The builtin GitHub plugin's background sync service wakes every 5 minutes and, for each tracked repository, runs four gh list commands in parallel (issue open+closed, pr open+closed). Those commands are GraphQL. With many BB projects that have GitHub origin remotes, this burns a large fraction of the shared personal GitHub token every hour and starves interactive gh from agents on the same machine.
I expected the refresh interval to scale with how many repositories are tracked, or to be configurable. It is a hardcoded 5 minutes.
2. Versions and environment
- bb 0.42.1, desktop app (
/Applications/bb.app), macOS 26.5.2 (25F84), arm64 - Builtin plugin
[email protected](builtin:github) - GitHub CLI on PATH (
ghauthenticated to github.com via keyring) - 34 BB projects whose checkouts have a GitHub
origin(so 34 tracked repos;extraReposempty) - bb Connect paired; this report is from thread
thr_zvpghw28aq(childthr_ns8jmyv7eedrafted a patch) - Code cited below is
mainat1bc80e1d57991fe60a3896e60e0159427194c7bb(still the 5-minute constant). I later overlaid a local patch on this machine; the measurements below are from before that overlay, on stock 0.42.1.
3. Steps to reproduce
Minimal path (no need for 34 projects). Uses extraRepos so a stranger can reproduce with one BB project.
- On bb 0.42.1 (or
mainat1bc80e1d), withgh auth statussucceeding for github.com:
bb plugin install builtin:github
bb plugin config github set extraRepos "cli/cli, cli/go-gh, cli/gh-extension-precompile"
bb plugin reload github- Confirm the plugin is running and the catalog includes those three repos:
bb plugin list | rg github
bb github repos- Wait ~12 minutes (two full cycles). Capture logs and a live
ghsample during a sync:
bb plugin logs github -n 30
ps -ax -o pid,command | rg 'gh (issue|pr) list'Did not reproduce with: a machine that has zero GitHub project remotes and empty extraRepos (the service still loops, but fetchRepoItems is not called). This is not agent gh usage and not the gtd-sidebar poller (that one is gh api graphql / gh api repos/…/pulls).
4. Expected vs actual
Actual on 0.42.1 with 34 project remotes, bb plugin logs github (UTC):
{"ts":1789040440250,"level":"info","message":"synced 1941 item(s) across 34 repo(s)"}
{"ts":1789040792797,"level":"info","message":"synced 1941 item(s) across 34 repo(s)"}
{"ts":1789041820270,"level":"info","message":"synced 1943 item(s) across 34 repo(s)"}
{"ts":1789042164639,"level":"info","message":"synced 1944 item(s) across 34 repo(s)"}
Deltas: 352.5 s and 344.4 s between completed syncs (≈5 minutes of park plus ~45–60 s of gh work).
During a tick, ps showed four gh processes per repo, of the form:
gh issue list -R <owner>/<repo> --state open --limit 100 --json number,title,state,author,labels,assignees,url,body,updatedAt
gh issue list -R <owner>/<repo> --state closed --limit 50 --json number,title,state,author,labels,assignees,url,body,updatedAt
gh pr list -R <owner>/<repo> --state open --limit 50 --json number,title,state,author,labels,assignees,url,body,updatedAt
gh pr list -R <owner>/<repo> --state closed --limit 30 --json number,title,state,author,labels,assignees,url,body,updatedAt
Arithmetic: 34 repos × 4 commands × 12 cycles/hour = 1632 gh invocations/hour from this plugin alone. gh pr list / gh issue list are GraphQL; GET /rate_limit under-reports that budget (a real gh pr list response showed X-RateLimit-Resource: graphql).
Expected: either a longer default interval, an interval that grows with tracked-repo count, or a setting. Interactive agent gh on the same token should not compete with a 5-minute full-catalog scrape.
5. Evidence
Hardcoded interval and the four-call fetch, main @ 1bc80e1d:
SYNC_INTERVAL_MS = 5 * 60_000fetchRepoItemsPromise.allof issue/pr list- service loop parks
SYNC_INTERVAL_MSafter eachsyncAll
Limits used: ISSUE_PAGE = 100, CLOSED_ISSUE_PAGE = 50, PR_PAGE = 50, CLOSED_PR_PAGE = 30 (L7–L10).
Investigation: bb thread thr_zvpghw28aq. Prototype (not for merge until contributor allow-list): closed PR #3404 — auto-scale the park from repo count (~400 list-calls/hour target, clamp 5–60 min; 34 repos → 21 min).
6. What you ruled out
- Not No way to pick which GitHub repositories the panel tracks #2543: that issue is about which repos to track, not how often the tracker polls.
- Not github plugin latches needs-configuration on one transient gh auth failure and never re-probes #1758: auth-latch; sync here succeeds (
synced … across 34 repo(s)). - Not Github plugin fails to load PRs when issues are disabled for repo #1267: issues-disabled handling already exists in
ghIssuesTolerant. - Not agent/
gtd-sidebartraffic: those aregh api/gh api graphql, notgh issue list/gh pr list. - Still present on
mainat1bc80e1d(constant unchanged). - Empty
extraReposdoes not help: projectoriginremotes are auto-discovered.
7. Suggested priority and effort
High for anyone with tens of GitHub-backed BB projects (shared 5000/hour token; no setting to slow it down). Effort looks small: change the constant and/or scale by repos.length. Workaround: none besides fewer projects or disabling the plugin.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 10, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type: Feature, Priority: Medium, Effort: Low, and labels
plugins,github,perf. No existing classifications needed preserving; all values verified after writing.Source review confirms the fixed polling policy. Adaptive or configurable refresh adds scheduling behavior; shared-token contention makes this a meaningful improvement for larger catalogs. Classified as a feature request rather than a demonstrated failure of the existing scheduler. Per this rule, reproduction reporting and an automatic PR were skipped for the final Feature type.
Reduce GitHub background polling and batch repository queries (#3447)