codex icon indicating copy to clipboard operation
codex copied to clipboard

Stream disconnected before completion: Transport error

Open HanYang3588 opened this issue 1 year ago • 92 comments

What version of Codex is running?

0.38.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 25.0.0 arm64 arm

What steps can reproduce the bug?

This problem will occur as long as it is used, no special operation is required.

What is the expected behavior?

No response

What do you see instead?

⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 1/5 in 181ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 2/5 in 368ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 3/5 in 737ms… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 4/5 in 1.632s… ⚠️ stream error: stream disconnected before completion: Transport error: error decoding response body; retrying 5/5 in 3.23s… ■ stream disconnected before completion: Transport error: error decoding response body

Additional information

The MCP I configured is context7, and I also used VPN, but my VPN can be guaranteed to be normal.

HanYang3588 avatar Sep 18 '25 03:09 HanYang3588

Related to #2921 ?

sa-adebayo avatar Sep 18 '25 06:09 sa-adebayo

Related to #2921 ?

Yep, same problem. But no effective solution was found. Some people suggested restarting codex , but this moethod is too troublesome. Wait for this issue to be fixed.

HanYang3588 avatar Sep 18 '25 12:09 HanYang3588

same issue for two days, cannot complete even one task

hemingway33 avatar Sep 19 '25 07:09 hemingway33

same issue +1

xiejesses avatar Sep 19 '25 08:09 xiejesses

+1

hwb96 avatar Sep 19 '25 08:09 hwb96

Version 0.39 sames to have solved this problem. At least I haven't encountered this problem today. Try updating to the latest version.

HanYang3588 avatar Sep 19 '25 12:09 HanYang3588

I'm still having the same issue on codex-cli 0.39.0

DenisGorbachev avatar Sep 19 '25 23:09 DenisGorbachev

+1. Tried different VPNs and not solving the problem

JettLiu-0129 avatar Sep 21 '25 09:09 JettLiu-0129

+1 I've run into the same issue these past few days But my access speed to ChatGPT is actually very fast

buildinpublichub avatar Sep 22 '25 11:09 buildinpublichub

+1

iw2rmb avatar Sep 22 '25 19:09 iw2rmb

I had this issue today. Was looking at my DNS logs while seeing the reconnect messages and noticed my host making calls to openrouter.ai

I had OPENAI_API_KEY env var set as part of Qwen CLI testing and this was causing the failure (and routing to openrouter for some reason?). I am using OAUTH auth to use Codex, not the API key.

Unsetting the env var re-enabled Codex CLI for me.

leoric-crown avatar Sep 24 '25 06:09 leoric-crown

same

IlyaShorin avatar Sep 24 '25 16:09 IlyaShorin

same!

felixzhao11 avatar Sep 25 '25 06:09 felixzhao11

+1

Lzzzs avatar Sep 25 '25 07:09 Lzzzs

+1

octopusnoob avatar Sep 25 '25 12:09 octopusnoob

Version: 0.4.14 Still see a lot of this in Codex's work steam, though is not going to 5/5 very often any more. It's feels odd that it wouldn't be able to decode the response from their own servers well enough to at least tell you what actually is wrong. Either this error is too generic, or it's possible for the endpoint to respond in an unparseable format.. Which would be odd because they control both sides.

Grallen avatar Sep 25 '25 22:09 Grallen

+1

DrewZhu-lab avatar Sep 26 '25 04:09 DrewZhu-lab

+1

shuicici avatar Sep 26 '25 10:09 shuicici

+1

borkeszmate avatar Sep 26 '25 12:09 borkeszmate

+1

adnanh avatar Sep 26 '25 13:09 adnanh