GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(codex): same-request multi-account failover on quota 429 (#584) by Wibias · Pull Request #585 · lidge-jun/opencodex

Conversation

@Wibias

@Wibias Wibias commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix Multi-account failover issue: Session freezes on depleted primary account despite active secondary Pro account #584: when the active Codex pool account returns a pre-stream 429/402, retry once on an eligible alternate account in the same request (mirrors the existing allow-listed model-400 pool retry and API-key 429 rotation).
  • Sticky threads whose bound account is already over �utoSwitchThreshold rebind immediately instead of waiting up to 60s.
  • Docs note + regression tests for HTTP and streamed pre-stream 429 failover, single-account fail-closed, and immediate affinity rebind.

Why

Routing already cooled the depleted account and switched �ctiveCodexAccountId after a 429, but the failing turn was still returned to Codex CLI — which shows the limit/overuse UI and stalls until the user manually retries. Same-request failover makes the secondary Pro account transparent.

Test plan

  • �un run typecheck
  • �un test tests/server-auth.test.ts -t "Activation|pool retry|Multi-account failover issue: Session freezes on depleted primary account despite active secondary Pro account #584"
  • �un test tests/codex-routing.test.ts
  • �un run privacy:scan
  • CI green on Linux/Windows/macOS
  • Manual: primary Plus exhausted + secondary Pro with quota → multi-step Codex CLI session continues without limit stall

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Wibias
fix(codex): same-request pool failover on pre-stream 429/402
340e7d8
Retry exhausted primary accounts once on an eligible alternate within the same turn, and rebind over-threshold sticky threads immediately so Codex CLI does not stall when a secondary still has quota (#584).
@Wibias
Wibias requested review from Ingwannu and lidge-jun as code owners July 28, 2026 01:56
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Wibias, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 49900942-43df-4663-b577-8eb9ad81ce18

📥 Commits

Reviewing files that changed from the base of the PR and between 94a83bc and e589087.

📒 Files selected for processing (5)
  • docs-site/src/content/docs/reference/configuration.md
  • src/codex/routing.ts
  • src/server/responses/core.ts
  • tests/codex-routing.test.ts
  • tests/server-auth.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the bug Something isn't working label Jul 28, 2026
@Wibias

This comment was marked as outdated.

Sign in to view
@Wibias

This comment was marked as outdated.

Sign in to view
@coderabbitai

This comment was marked as outdated.

Sign in to view
@chatgpt-codex-connector

This comment was marked as outdated.

Sign in to view
@Wibias
fix(codex): attribute pool-retry transport failures to alternate account
2556576
Also classify HTTP 402 as quota so same-request failover cools the depleted account consistently with 429.
@Wibias

This comment was marked as outdated.

Sign in to view
@Wibias

This comment was marked as outdated.

Sign in to view
@coderabbitai

This comment was marked as outdated.

Sign in to view
@chatgpt-codex-connector

This comment was marked as outdated.

Sign in to view
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
fix(codex): keep subagent quota health scoped to the retried account
e589087
After a successful same-request pool failover, update subagentFallbackAccountId so streamed terminal 429s attribute health to the account that actually served.
@Wibias Wibias mentioned this pull request Jul 28, 2026
Multi-account failover issue: Session freezes on depleted primary account despite active secondary Pro account #584
Closed
2 tasks done
@Wibias
Wibias merged commit 903b62c into lidge-jun:dev Jul 28, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Wibias Wibias mentioned this pull request Jul 28, 2026
fix: scope Spark cooldowns to its native quota #599
Merged
3 tasks done
@luvs01 luvs01 mentioned this pull request Jul 29, 2026
[Feature]: opt-in reset-credit recovery after verified pre-stream quota exhaustion #657
Closed
14 of 31 tasks
@Wibias
Wibias deleted the feat/584-codex-multiaccount-failover branch July 30, 2026 19:06
This was referenced Aug 3, 2026
[Bug]: /v1/responses/compact returns pool 429/402 without same-request alternate attempt #913
Closed
[Bug]: Reset-derived cooldowns can miss early recovery while another pool account remains eligible #915
Closed
@jeromechou1881 jeromechou1881 mentioned this pull request Aug 31, 2026
[Bug]: Codex pool intermittently fails to switch accounts after 5-hour quota exhaustion #3029
Closed
2 tasks done
@h-dot-seo h-dot-seo mentioned this pull request Sep 4, 2026
[Bug]: 2.41.0 keeps routing to a 5h-exhausted Codex account after repeated 502s #3425
Closed
2 tasks done
@FredAmartey FredAmartey mentioned this pull request Sep 6, 2026
fix(responses): answer a wrapped WebSocket rejection with its HTTP status #3740
Closed
6 of 7 tasks
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
fix(codex): same-request multi-account failover on quota 429 (lidge-j…
98f7fba
…un#584) (lidge-jun#585)

* fix(codex): same-request pool failover on pre-stream 429/402

Retry exhausted primary accounts once on an eligible alternate within the same turn, and rebind over-threshold sticky threads immediately so Codex CLI does not stall when a secondary still has quota (lidge-jun#584).

* fix(codex): attribute pool-retry transport failures to alternate account

Also classify HTTP 402 as quota so same-request failover cools the depleted account consistently with 429.

* fix(codex): keep subagent quota health scoped to the retried account

After a successful same-request pool failover, update subagentFallbackAccountId so streamed terminal 429s attribute health to the account that actually served.
@coderabbitai coderabbitai Bot mentioned this pull request Sep 21, 2026
Desktop shell: one exit path, one startup surface and a real tray probe #5384
Merged
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
@Ingwannu Ingwannu Awaiting requested review from Ingwannu Ingwannu is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Wibias
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.