Repository navigation
Conversation
…ceeds A 401 during a provider outage forces an OAuth refresh, and a second 401 on the fresh token marks the account in error. Nothing cleared that error: selection skips errored accounts and freshSecret refused to hand the periodic usage refresh a credential for one. Both Codex accounts stayed out of routing after the 2026-09-25 Codex outage until re-enabled by hand. The usage refresh now obtains its credential past the error gate, and an accepted usage response clears the error. Request paths keep the gate. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 23, 2026
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
During the 2026-09-25 Codex outage, upstream answered pooled requests with
401 invalid_api_key. The hub responded as it would to a stale token: it force-refreshed the OAuth credential, which succeeded, and retried. The retry also got a 401, somarkAuthErrorrecorded an error on the account. Nothing ever cleared that error. Selection skips errored accounts, and the only automatic clear is a successful OAuth refresh insidefreshSecret, which throws before refreshing when the account is errored. The periodic five-minute usage refresh goes throughfreshSecrettoo, so it also threw. That left both Codex accounts out of routing after OpenAI marked the incident resolved. At the same time,wham/usageaccepted both stored tokens, and requests succeeded once the errors were cleared by hand withbb pool account enable.What changed
ProviderAdapter.refreshUsagenow resolvestruewhen the upstream usage endpoint accepted the account's credentials (Claude and Codex adapters).hub.ts: the usage refresh requests its secret with a newusagesecret use that is exempt from the error gate. When the usage endpoint accepts the credential, the hub clears the error and publishes an accounts-changed update. Request paths keep the gate, so in-flight requests still stop using an account another request just marked in error.bb pool account refresh <id>now also clears a recovered account's error immediately.PLUGIN_OVERVIEW.mdand the account-pool skill reference describe the recovery.How you verified
returns an account rejected during an outage once usage accepts its credentials: a request 401s through a successful forced refresh, the account is inerror, and requests get 429. After the outage ends,account.refreshUsagereportsreadyand the next request returns 200. Without the fix it fails withexpected 'error' to be 'ready'.pnpm exec turbo run typecheck lint test --filter='...[origin/main]': 9/9 tasks passed, 314/314 account-pool tests.wham/usagewhile the pool still reported them in error.🤖 Generated with Claude Code