You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Pooled native Codex requests do not retry or fail over on upstream server_is_overloaded / upstream_server_error before output #6969
Pooled native Codex requests to gpt-6.1-sol fail with a single attempt when the upstream declines before any output with server_is_overloaded (503, "Our servers are currently overloaded. Please try again later.") or upstream_server_error (502). The proxy neither retries nor moves the request to another healthy pool account. Codex then reports "Selected model is at capacity. Please try a different model." and ends the turn without retrying.
This is the upstream counterpart of #6642, which covered a locally generated server_is_overloaded during a restart drain. Related: #6740 (Windows 502 surge).
Steps to reproduce
Run OpenCodex 2.83.0 on macOS with a native Codex pool of 4 ChatGPT accounts.
Send many concurrent gpt-6.1-sol Responses requests with effort high (about 800 per hour from parallel agent sessions).
Watch the upstream decline some of them at the protocol prelude.
Expected
A decline before any output is safe to replay. The proxy should retry with a short backoff, or move to another eligible pool account, before it returns a terminal 503 or 502.
Actual
Each failed request has exactly one attempt (sendCount: 1, recoveryKinds: [], failureStage: "protocol-prelude", failureCause: "upstream-declined", spend.moveReasons: ["healthy"], affinity: "new_bind"). Between 15:00 and 16:00 KST on 2026-10-12, 43 of 826 gpt-6.1-sol requests failed this way: 14 with 503 server_is_overloaded and 29 with 502 upstream_server_error. The failures were spread across all four pool accounts. One conversation hit 502 four times on the same account (Codex's own 5xx retries), then a terminal 503.
Current dev a0191a1b6f already has a transient-5xx alternate-account path (passthrough-dispatch.ts:1648, shouldRetryCodexPoolAccountTransient in core-codex-account.ts:372). It deliberately excludes a Response marked non-replayable. In the WebSocket exchange, a create sent upstream but not committed to the client can produce such a marked prelude failure because origin execution may already have started.
Therefore sendCount:1 plus no visible output is not by itself proof that replay is safe or that general 5xx failover is absent. Please distinguish an authoritative terminal refusal from socket death/silence after send, and include the redacted stage fields/current explicit retry grant for one occurrence. #6974 adds terminal frame/status diagnostics for exactly that distinction; it does not itself authorize retry or fix this report.
The narrow regression for any proposed recovery must show an authoritative refusal reaching the existing shared send budget, cancellation during backoff, fixed-account behavior and no alternate-account replay for ambiguous post-send failure or any output/tool effect. No live accounts/load generation or automatic replay policy change was performed during this triage. Keeping this open pending that evidence and the owner decision on the native recovery contract.
Activity
Ingwannu commentedon Oct 12, 2026
Current dev
a0191a1b6falready has a transient-5xx alternate-account path (passthrough-dispatch.ts:1648,shouldRetryCodexPoolAccountTransientincore-codex-account.ts:372). It deliberately excludes a Response marked non-replayable. In the WebSocket exchange, a create sent upstream but not committed to the client can produce such a marked prelude failure because origin execution may already have started.Therefore
sendCount:1plus no visible output is not by itself proof that replay is safe or that general 5xx failover is absent. Please distinguish an authoritative terminal refusal from socket death/silence after send, and include the redacted stage fields/current explicit retry grant for one occurrence. #6974 adds terminal frame/status diagnostics for exactly that distinction; it does not itself authorize retry or fix this report.The narrow regression for any proposed recovery must show an authoritative refusal reaching the existing shared send budget, cancellation during backoff, fixed-account behavior and no alternate-account replay for ambiguous post-send failure or any output/tool effect. No live accounts/load generation or automatic replay policy change was performed during this triage. Keeping this open pending that evidence and the owner decision on the native recovery contract.
fix(responses): retry and fail over a pooled Codex turn the upstream …
fix(responses): bound the pre-output hold by the send's header deadli…
docs(structure): name the pre-output refusal hold option as it now ex…
fix(responses): retry and fail over a pooled Codex turn the upstream …
lidge-jun commentedon Oct 12, 2026
Fixed on
devby #6997 (commita061e70086), landed through #7009 (merge8f10f238e3). Ships in 2.84.0.