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
OpenAI server_is_overloaded stream errors are not retried #25884
OpenAI-compatible streams can fail with a transient overload event instead of normal text:
{"type":"error","error":{"type":"service_unavailable_error","code":"server_is_overloaded","message":"Our servers are currently overloaded. Please try again later."}}
When that shape is surfaced as a stream error, it should enter the existing session retry flow instead of stopping the turn as a final error.
Plugins
None required to reproduce the underlying provider error shape.
OpenCode version
1.14.33
Steps to reproduce
Use an OpenAI-compatible model during a provider overload window.
The provider returns the stream error above.
The session stops instead of showing the existing retry countdown/status.
This issue appears to have been generated by an AI tool (aidevops.sh, as noted in the footer). AI-generated walls of text are not acceptable — please rewrite this in your own words, describing the actual problem you experienced and why you need this feature.
Feature requests must start with [FEATURE]: in the title.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
changed the title [-]Retry provider overload errors with inline recovery status[/-][+]OpenAI server_is_overloaded stream errors are not retried[/+]on May 5, 2026
Thanks for updating the issue! It now meets the contributing guidelines and includes all the necessary information. We appreciate you taking the time to provide a clear description, reproduction steps, and system details.
Thanks for the automated guidance. I updated the issue and PR to match the repo templates and removed the generated footer/long-form wording.
I also checked the related work and saw #25728 covers the same server_is_overloaded stream shape from the Codex side. I pushed one small adjustment here so this branch also routes the stream error through parseStreamError, not just the later retry classifier.
If maintainers prefer #25728, I can close this PR as a duplicate. Otherwise this one is now the same narrow bug fix from the OpenAI-compatible stream angle.
This needs to be fixed. Also I am shocked we all have this issue yet codex status shows that everything is absolutely fine. What am I even paying my money for at this point...
This issue has been relentless today, had to switch to pi to get work done. Happening on v1 latest and v2 latest. I suspect it's only reproducible under certain conditions at OpenAI.
Closing for the specific payload in this issue. The August report of failures on both versions may involve another error shape or retry condition; if it still occurs, please provide a fresh version and the actual stream/error payload so that path can be investigated separately.
Activity
github-actions commentedon May 5, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:in the title.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
provider_unavailableerrors from OpenRouter are not retried, causing subagent/session aborts #22448: 502provider_unavailableerrors from OpenRouter are not retried, causing subagent/session abortsIf you believe this was flagged incorrectly, please let a maintainer know.
[-]Retry provider overload errors with inline recovery status[/-][+]OpenAI server_is_overloaded stream errors are not retried[/+]github-actions commentedon May 5, 2026
Thanks for updating the issue! It now meets the contributing guidelines and includes all the necessary information. We appreciate you taking the time to provide a clear description, reproduction steps, and system details.
github-actions commentedon May 5, 2026
test
johnwaldo commentedon May 5, 2026
Thanks for the automated guidance. I updated the issue and PR to match the repo templates and removed the generated footer/long-form wording.
I also checked the related work and saw #25728 covers the same
server_is_overloadedstream shape from the Codex side. I pushed one small adjustment here so this branch also routes the stream error throughparseStreamError, not just the later retry classifier.If maintainers prefer #25728, I can close this PR as a duplicate. Otherwise this one is now the same narrow bug fix from the OpenAI-compatible stream angle.
samiralibabic commentedon May 5, 2026
Please prioritise.
EnderHane commentedon May 6, 2026
I am suprised. This almost makes OpenAI service unusable at all with OpenCode
MichaelFisher1997 commentedon May 6, 2026
Yes please fix this
doodlezz commentedon May 6, 2026
service_unavailable_error: Our servers are currently overloaded. Please try again later.
AleksQuantum commentedon May 6, 2026
This needs to be fixed. Also I am shocked we all have this issue yet codex status shows that everything is absolutely fine. What am I even paying my money for at this point...
Techie5879 commentedon May 6, 2026
Yup this started happening with GPT5.5 on pro subs from yday. Probably needs to be retried.
samiralibabic commentedon May 6, 2026
Fixed, but on dev. I built from dev and it works. Feel free to release.
spark4862 commentedon Jun 2, 2026
Related fix in #30323 — covers server_is_overloaded and other OpenAI/Codex stream envelopes in parseStreamError + retryable().
dawidgora commentedon Jul 17, 2026
The issue is still valid. I can see related PR with fix is closed now...
fareesh commentedon Aug 11, 2026
This issue has been relentless today, had to switch to pi to get work done. Happening on v1 latest and v2 latest. I suspect it's only reproducible under certain conditions at OpenAI.
opencode-agent commentedon Oct 1, 2026
Checked the reported
type: "error"stream frame with nestederror.code: "server_is_overloaded"against the current V1 (dev) and V2 (v2) code:parseStreamErroras retryable; its session retry path also recognizes overload messages. The broader retry handling landed in refactor(opencode): simplify retry error matching #40694 and fix(opencode): expand retryable error patterns #40707, so fix: retry OpenAI overload errors #25886 is not needed for this specific frame.ProviderInternal, which session retry treats as retryable. I checked that exact payload against the V2 classifier.Closing for the specific payload in this issue. The August report of failures on both versions may involve another error shape or retry condition; if it still occurs, please provide a fresh version and the actual stream/error payload so that path can be investigated separately.