Repository navigation
Record sanitized OAuth refresh diagnostics in Account Pooler - #4918
Merged
ymichael merged 2 commits intoOct 5, 2026
Merged
Conversation
ymichael
deleted the
bb/investigate-claude-account-in-pooler-thr_sfqjqzm9n7
branch
October 5, 2026 18:19
stephendolan
added a commit
to stephendolan/bb
that referenced
this pull request
Oct 6, 2026
Port the Account Pooler changes from get-bb/bb get-bb#4739, get-bb#4918, and get-bb#5052: safe OAuth refresh diagnostics, Windows-compatible permission checks, and deterministic parent retry tests. Preserve least-usage selection and durable conversation assignments. Regenerate the standalone plugin for SDK 0.6.15 and include its TLS test fixtures so the exported package can run the complete test suite. Validation: 360 tests, lint, type checking, SDK contract check, and plugin build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Account Pooler discarded OAuth token endpoint error bodies and did not log refresh outcomes. An expired Claude refresh token therefore appeared only as
OAuth refresh failed with HTTP 400, with no refresh history to help explain when credentials stopped working.What changed
Preserve allowlisted OAuth error codes and descriptions in account errors exposed through status, CLI, and RPCs. For example, the error now includes
invalid_grant: Refresh token expired. Inspect JSON error bodies for at most one second and 4 KiB, retaining the existing HTTP rejection classification when inspection fails.Log Claude and Codex refresh successes and failures with provider, account ID, expiry timestamps, and whether refresh was forced. Omit credentials, arbitrary provider text, and raw response bodies.
How you verified
pnpm exec turbo run test lint typecheck --filter=bb-plugin-account-pool: 348 tests passed; typecheck and lint passed. Lint reports two existing React warnings in unchanged app code.pnpm exec turbo run test --filter=bb-plugin-account-pool -- src/provider-adapter.test.ts: all 24 tests passed after strengthening the stalled JSON response test.git diff --checkpassed.