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
server_error with OpenAI provider in OpenCode CLI, while direct Codex CLI works fine #23956
I want to ask whether this is a known compatibility/integration issue with OpenAI/Codex in OpenCode, especially in agent/streaming flow.
Problem
When I use my GPT/Codex account through OpenCode CLI, I often get this error:
{"type":"error","sequence_number":2,"error":{"type":"server_error","code":"server_error","message":"An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists. Please include the request ID ac4ddf64-7ea0-49d7-8382-b8b6672310fc in your message.","param":null}}
What is strange is:
This happens in OpenCode CLI
But when I use Codex CLI directly, I do not get this error
So it seems like the issue may be related to the OpenCode/agent integration layer rather than Codex itself.
Environment
OS: Windows
OpenCode version: 1.14.20
Provider: OpenAI
Model: openai/gpt-5.4
Terminal: hyper, windows terminal
Reproduction
Open OpenCode CLI
Use provider/model: gpt-5.4
Run an agent task or prompt
Wait for response streaming
Error appears very early with sequence_number: 2
Expected behavior
The request should complete normally, similar to when using Codex CLI directly.
Actual behavior
OpenCode intermittently returns server_error, while the same account/model workflow works in Codex CLI direct usage.
What I already tried
Retried multiple times
Confirmed the account/model works in Codex CLI directly
Observed similar issue in another agent-style terminal environment
Reconnected auth
Questions
Is this a known issue with OpenAI provider support in OpenCode?
Could this be related to streaming/event handling in agent mode?
Is there any recommended config, provider setting, or model format I should change?
Do you want me to provide debug logs for this?
Debug information
Please let me know which logs are most useful
Thanks.
Reacted by Salloxy, allen, Aleksandr Efremenkov and connorivy
changed the title [-]server_error with OpenAI provider in OpenCode agent mode, while direct Codex CLI works fine[/-][+]server_error with OpenAI provider in OpenCode CLI, while direct Codex CLI works fine[/+]on Apr 23, 2026
Activity
github-actions commentedon Apr 23, 2026
This issue might be a duplicate of existing issues. Please check:
server_error(sequence_number:2) with gpt-5.3-codex — describes the same exact error payload, same model family, same intermittent behaviorserver_error/sequence_number:2error withgpt-5.4, also reported in the last few daysPlease review these issues to see if they cover your problem. If so, consider adding any new details there rather than in a separate report.
[-]server_error with OpenAI provider in OpenCode agent mode, while direct Codex CLI works fine[/-][+]server_error with OpenAI provider in OpenCode CLI, while direct Codex CLI works fine[/+]rekram1-node commentedon Jun 23, 2026
Automated: closing question issues.
GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.
If this is a bug or feature request, please open a new issue with the appropriate template.