Repository navigation
Description
Summary
The builtin github plugin probes gh auth status exactly once, at load. On any failure it enters needs-configuration and stays there for the life of the server process — nothing re-probes. A single transient failure at bb start therefore disables the plugin indefinitely on a machine where gh works perfectly, and the message it shows names a remedy that cannot fix it.
Observed on bb 0.38.0, macOS 26 (Darwin 25.5.0), gh 2.95.0.
What happened
The plugin sat in needs-configuration for over a day:
$ bb plugin list
[email protected] needs-configuration (GitHub CLI is not authenticated. Install the
GitHub CLI (https://cli.github.com) and run `gh auth login`, then
`bb plugin reload github`.)
while gh was authenticated and in active use the whole time (gh pr create, gh pr merge, gh api, gh run view):
$ gh auth status
github.com
✓ Logged in to github.com account MGrin (keyring)
- Active account: true
- Token scopes: 'gist', 'read:org', 'read:packages', 'repo', 'workflow'
bb plugin reload github fixed it instantly. Nothing about the machine had changed in between.
Cause
From the shipped server/dist/builtin-plugins/github/dist/server.js:
async function checkAuth() {
try {
await gh(["auth", "status"], 1e4);
ghAuthError = null;
} catch (error) {
ghAuthError = error instanceof Error ? error.message : String(error);
throw needsConfiguration(`GitHub CLI is not authenticated. ${GH_HINT}`);
}
}checkAuth() runs at plugin load and only runs again on reload. Any one-off failure is latched permanently.
gh auth status is not a local-only check — it makes a real API call. Measured on this machine: 773 ms idle, 0.8–1.5 s at load average 23. So plausible one-off causes at startup include a login keychain not yet unlocked (the token is in the macOS keyring, not hosts.yml), a network blip, a slow start pushing past the 10 s timeout, or bb simply starting before gh auth login was ever run.
I could not determine which of those occurred in my case — the plugin keeps ghAuthError internally but bb plugin list shows only the generic hint, so the original error is not recoverable after the fact. That is arguably a second, smaller issue.
The message points at the wrong remedy
The hint says to run gh auth login. In this failure mode gh is already authenticated, so that changes nothing; the fix is the reload. Following the on-screen instruction produces no improvement, which reads as "bb is broken".
Reproduction
- Make
gh auth statusfail transiently at bb start — e.g. start bb with the network down, or before runninggh auth login. - Restore
ghto a working authenticated state and confirm withgh auth status. bb plugin list—githubis stillneeds-configuration, indefinitely.bb plugin reload github— it comes back asrunning.
Suggested fixes, any of which would do
- Re-probe on demand (or on a modest interval / backoff) instead of latching a terminal state — a transient dependency failure is not a configuration error.
- Distinguish "probe failed" from "gh reported unauthenticated", and word the hint accordingly. Only the second one should say
gh auth login. - Surface the retained
ghAuthErrorinbb plugin listso the original cause is diagnosable after the fact.
Workaround
For anyone hitting this: bb plugin reload github. gh auth login is not the fix if gh auth status already succeeds.
Activity
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1758.html
gh auth statusfailure (a network probe: outage, locked keychain, 10 s timeout) to NeedsConfigurationError, which the load-time probe reports via bb.status.needsConfiguration and the sync service throws out of start(); the plugin runtime then stops the service "until reload" and keeps needs-configuration until the next load, the plugin API has no way to clear it, and the app skips the frontend bundle of non-running plugins, so nothing ever re-runs gh and the "run gh auth login" hint cannot help.gh auth tokento tell "not logged in" from "logged in but the API probe failed"; other failures become a plain Error carrying gh's stderr. (2) The sync service catches non-configuration errors inside its loop and retries with backoff (30 s doub…gh auth status). Live repro used a shim that runs the real gh through a dead proxy (HTTPS_PROXY to a closed port) to simulate the network outage; the first live attempt was confounded by the dev server ho…The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).fix(github): re-probe gh auth instead of latching needs-configuration
Re-probe gh auth in the github plugin instead of latching needs-confi…
Fix GitHub sync service abort race (#1854)
Stabilize flaky tests and expand coverage (#1967)