Repository navigation
Description
Summary
A Claude OAuth account in Account Pooler whose refresh token was rejected (HTTP 400 invalid_grant) kept showing status: ready, error: null, and its last observed quota (5h 98%, 7d 100% / rejected) for about 22 hours — long after both windows had reset. Nothing in the UI or bb pool account list indicated the account needed a new sign-in; the failure was only visible in the server log, repeated every five minutes. bb pool account refresh <id> returned ok: true without changing anything.
Versions and environment
- bb 0.48.1 (
npx/desktop install), bb server moved to a remote Linux host (Ubuntu 24.04) withbb server move, reached through bb Connect. Desktop app on macOS. - Account Pooler enabled; 2 Claude OAuth accounts (Max) + 1 Codex OAuth account.
- The affected account was added with
bb pool account add --provider claude --importon the bb server host, where Claude Code 2.1.318 is signed in to the same Claude account.
Steps to reproduce
- On the bb server host, sign Claude Code in:
claude auth login. bb pool account add --provider claude --import.- On the same host, use Claude Code directly, outside the pool (e.g.
claude -p "hi"), so the CLI refreshes its OAuth token. Refresh tokens rotate, so the copy the pool imported becomes invalid. (This is my best explanation of how the token was invalidated; I did not capture the exact refresh that rotated it.) - Wait for the pool's access token to expire.
- Run
bb pool account list --jsonand open the pool usage popover.
Expected vs actual
Expected: after the token endpoint rejects the refresh token with 400 invalid_grant, the account is marked as an error (per the docs: "An account enters error only when its OAuth refresh token is rejected (HTTP 400 or 401 from the token endpoint)"), the UI asks to re-authenticate, and the stale quota is not presented as current.
Actual, ~22 h after the last successful observation (identifiers redacted):
fiveHourUtilization 0.98 fiveHourResetAt <yesterday 19:59> fiveHourStatus allowed
sevenDayUtilization 1 sevenDayResetAt <today 13:59> sevenDayStatus rejected
observedAt <yesterday 18:52>
status ready
error null
Server log, every ~5 minutes:
{"level":40,"component":"server","msg":"[plugin:account-pool] Account Pooler claude account <id> OAuth refresh failed: OAuth refresh failed with HTTP 400. invalid_grant. expiresAt=<yesterday 22:23>, forced=false."}
bb pool account refresh <id> --json returned "ok": true and the same account object, with observedAt unchanged and error: null; the log line after it still said forced=false.
The popover showed 98% / 100% for this account, while the per-machine usage view for the same Claude account (read from the host's own Claude Code login) correctly showed 0% / 0%.
Evidence
- Other pool accounts on the same host refreshed normally during the same period (fresh
observedAt), so this was not a network or upstream outage. - Re-adding the account with
--importproduced a new entry that immediately reported 0% / 0% with a freshobservedAt; the old entry stayed stale until removed. - Code at
fa30b0a: inhub.tsrefresh failure handling, anOAuthRefreshErrorrecords the rejected refresh token (recordRejectedRefresh) and rethrows; the account error is set from the usage-refresh path athub.ts#L370-L380. I could not determine from the code whyerrorstayednullin this case — that is the part to investigate.
What I ruled out
- The account was not actually exhausted: both reset times had passed, and the host's own Claude Code login showed 0% usage for the same account.
- Not a transient failure: the response was
400 invalid_grant, consistently, for ~22 h. - Related but different: Account Pooler: re-authenticate an existing account in place, add accounts disabled or with a priority, and show login expiry #6170 (re-authenticate in place, show login expiry), Account Pooler: pool-routed Claude Code and Codex threads, and CLIs they start, should authenticate only with the hub token and leave the host's own logins untouched #6171 (pool-routed threads shouldn't touch host logins — likely the root of the token rotation), Claude Code OAuth expiry: classify authorization failures and recover sign-in inside BB #3337 (Claude Code OAuth expiry recovery).
Suggested priority and effort (optional)
Medium. Workaround exists (remove and re-add the account), but the failure is silent: the pool presents a dead account as ready with a plausible-looking but stale quota, so users conclude the limits did not reset. Surfacing error (and ideally marking quota as stale when observedAt is far older than the reset times) would make it obvious.
AGENT GENERATED — written by a Claude Code agent in a bb thread after diagnosing the issue on the user's bb server; logs and JSON above are trimmed and redacted.
Activity
bb-slop-cop commentedon Nov 5, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders.no-repro.6e77fce8c7(Keep pooled accounts serving after a rejected proactive OAuth refresh #6661), merged November 2, fixes that transition and suppresses automatic rejected-token replays; the desktop 0.48.1 release was published October 30. The actual deployed bundle remains unverified.fa30b0a7dcin two clean checkouts (15 tests each); the full plugin suite passes all 390 tests. Expired credentials surfacestatus: error, notready.