Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
ChatGPT SSE HTTP 503 responses with an unfamiliar message lose their status before retry classification, causing immediate empty-error retries that ignore the response's seven-second Retry-After header.
Steps to reproduce
- Serve a loopback HTTP endpoint returning status 503,
Retry-After: 7, and{"error":{"message":"Maintenance in progress."}}. - Call the real ChatGPT Responses provider with SSE transport, the loopback base URL, and synthetic JWT auth containing a synthetic account ID.
- Pass each terminal assistant into
handleEmbeddedAssistantFailurewithcreateEmbeddedRunFailoverRetryController, preserving the empty-error counter as the caller does. Keep the attempt replay-safe, with no output or tool effects. - Record incoming HTTP request times through the retry budget. Repeat with a configured fallback.
Expected behavior
The existing model failover contract gives the embedded controller sole transient retry ownership and honors provider pacing. The transport must retain HTTP 503 and Retry-After together so the controller can classify and wait.
Actual behavior
Four requests arrived at 0/179/184/186 ms without a fallback and 0/4/6/8 ms with one. Neither case consulted the transient controller. The terminal error was Maintenance in progress.; Retry-After: 7 seconds, with no HTTP status or provider code. Classification returned null; the fallback case eventually threw an unknown failure.
OpenClaw version
Source a828190; the implicated producer is also unchanged at main snapshot b55b725.
Operating system
macOS 27.0, Node 26.8.1
Install method
Trusted source worktree with matching pinned dependencies; direct repository test/proof wrappers.
Model
Synthetic loopback model for deterministic outage proof. Separate authenticated smoke uses openai/gpt-5.6-luna.
Provider / routing chain
Embedded OpenClaw ChatGPT SSE provider -> loopback HTTP endpoint -> real assistant-failure owner and failover retry controller.
Additional provider/model setup details
Isolated proof HOME/state; no operator Gateway or state was modified. This does not allege a defect in native Codex app-server retry behavior.
Logs
HTTP 503; Retry-After:7
errorMessage=Maintenance in progress.; Retry-After: 7 seconds
classifiedReason=null
transientControllerConsults=0
requests(no fallback)=0,179,184,186 ms
requests(with fallback)=0,4,6,8 ms
Screenshots, recordings, and evidence
Four focused regression cases fail before the repair because status 429/500/503 is missing. The corrected transport passes 241 owner/sibling tests and the full changed gate. The same real loopback fault then paces every retry by seven seconds; a 503-then-200 recovery completes the synthetic reply after that wait. Separate authenticated ChatGPT 200 success and 400 invalid-parameter error prove the actual provider success/non-OK paths; no live outage or quota exhaustion was forced.
Impact and severity
Affected surface: embedded ChatGPT SSE, including its auto-transport fallback leg. This deterministically exhausts the available recovery budget as a burst for a code-free 503 with unfamiliar wording, allowing an avoidable failure or premature model fallback. Production frequency is unknown. No data loss was observed.
Additional information
Related: #134281. Raw parent-relative source comparison shows that 4a1cc22 removed status-based inner retry ownership without retaining status at the central handoff. Stable v2026.8.2 used status-based inner retries; that stable timing comparison is source-only, not an executed timing run.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Sep 3, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 3, 2026, 3:39 AM ET / 07:39 UTC.
Summary
Keep open. Current main still drops the SSE HTTP status before the canonical failure classifier, while the formally linked open PR is a focused candidate fix; the
maintainerlabel also requires explicit maintainer handling.Reproducibility: yes. current source establishes the loopback 503 path—status is read but discarded, while the classifier needs retained status before the existing controller can apply the Retry-After hint.
Regression provenance
Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.
Next step
Do not create a parallel repair: #137146 formally owns this small source-proven bug, and this issue carries the protected
maintainerlabel.Review details
Best possible solution:
At the SSE producer, construct the existing typed provider error with status and code, then prove unfamiliar 429/500/503 responses with Retry-After are classified and paced by the one existing retry controller without reintroducing a transport-local retry loop.
Do we have a high-confidence way to reproduce the issue?
Yes: current source establishes the loopback 503 path—status is read but discarded, while the classifier needs retained status before the existing controller can apply the Retry-After hint.
Is this the best way to solve the issue?
Yes: preserving status at the SSE producer is the owner-boundary repair because it lets the existing classifier and single retry controller operate without another retry implementation.
AGENTS.md: found and applied where relevant.
Codex review notes: model internal, reasoning high; reviewed against 583a17763ed9.
Label changes
Label changes:
P1: A temporary ChatGPT provider outage can exhaust recovery as an immediate burst and cause avoidable failure or fallback.impact:auth-provider: The broken path is ChatGPT provider error classification and retry pacing.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:linked-pr-open: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.Label justifications:
P1: A temporary ChatGPT provider outage can exhaust recovery as an immediate burst and cause avoidable failure or fallback.impact:auth-provider: The broken path is ChatGPT provider error classification and retry pacing.Evidence reviewed
What I checked:
packages/ai/src/providers/openai-chatgpt-responses.ts:526, 583a17763ed9)src/agents/embedded-agent-helpers/assistant-message-failures.ts:18, 583a17763ed9)docs/concepts/model-failover.md. (docs/concepts/model-failover.md:269, 583a17763ed9)src/agents/embedded-agent-runner/run/failover-retry-controller.ts:150, 4a1cc226964a)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.