Stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

Open 💬 20 comments Opened Mar 2, 2026 by joe5saia
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

When using codex from the CLI I am frequently getting a "Reconnecting" message and codex fails to reconnect after 5 attempts. I see this message Stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses). The thread ID is 019caee5-4280-7290-a4ca-6456a7f599c4

View original on GitHub ↗

20 Comments

etraut-openai contributor · 4 months ago

From your logs, this looks like a basic network connectivity issue. We see these frequently with VPNs and proxies, but it might also just be flakiness with your connection.

joe5saia · 4 months ago

Cool Thank you. For additional context, I use Tailscale and have a hardwired connection to my router. No other VPNs running other than Tailscale. I see this issue about once an hour or so, but it's unpredictable.

hhmoud-acerta · 4 months ago

@etraut-openai My thread ID is 019caf1f-0131-7303-8f3c-5d92be272875, any idea what is going on? Not using a VPN.

etraut-openai contributor · 4 months ago

@hhmoud-acerta, yours looks like a connectivity issue as well. You mentioned you are not using a VPN. How about a corporate proxy or firewall?

SaiKayala · 4 months ago

Hi @etraut-openai , looks like even I'm facing the same issue, both on cli and codex app. I dont use any VPN nor behind any corporate firewall or proxy. It works well for few hours and then doesn't at all for few.

Feedback id - 019caf97-3bf2-7361-ae77-16d4ba5ab89a

0xNiloy · 4 months ago

Hey @etraut-openai I am getting the exact same issue .

Here is the feedback ID : 019cb060-a88e-77b2-a9df-4bb9825f238d

Supercox72 · 4 months ago

What can you tell me about these sessions?
019cc2a1-ca49-7b11-b4b4-a1aeae73c146
019cc43c-7ad5-7fe0-b4c7-ffcd5454d2fe

■ stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

I started getting this at my office on Wednesday evening March 4, 2026 and regularly receiving them at my home since then Wednesday through Friday March 6, 2026.

<img width="640" height="1080" alt="Image" src="https://github.com/user-attachments/assets/324663b8-ce19-4908-97b1-4a30f712cf25" />

Supercox72 · 4 months ago

Somebody recommended that I log out & that would fix it.

Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token)

I took the bait... desperate to get this working again and then I can't get logged back in!
Five separate times (& counting) without luck!

<img width="1499" height="175" alt="Image" src="https://github.com/user-attachments/assets/d17ee54a-ed4c-4d4d-9dfe-f999be8d1e57" />

yukuanj · 4 months ago
Somebody recommended that I log out & that would fix it. Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token) I took the bait... desperate to get this working again and then I can't get logged back in! Five separate times (& counting) without luck! <img alt="Image" width="1499" height="175" src="https://private-user-images.githubusercontent.com/15762286/559660181-d17ee54a-ed4c-4d4d-9dfe-f999be8d1e57.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMyMTU1NDksIm5iZiI6MTc3MzIxNTI0OSwicGF0aCI6Ii8xNTc2MjI4Ni81NTk2NjAxODEtZDE3ZWU1NGEtZWQ0Yy00ZDRkLTlkZmUtZjk5OWJlOGQxZTU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzExVDA3NDcyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0NGM5YmNhMzZhODE3ZTdjMWE0M2VjYjc1YWZjMWVhMmJkZjQ5NmIwNThiMzRlYWEwNDU1NGQ1NWUzNDk5OGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ww7DBjR8gSkXDxmOvouW5OMJtZp2Jyj0ugAo_Oy1BJc">

Same to me.

s1f102500012 · 4 months ago

I ran into the same issue on my Mac. After testing, I found that only Codex 5.3 in the CLI works; all models in the app, as well as the other models in the CLI, are unavailable for local tasks.

cihadturhan · 3 months ago
From your logs, this looks like a basic network connectivity issue. We see these frequently with VPNs and proxies, but it might also just be flakiness with your connection.

This is not a network issue. Changing model works. I'm pretty sure there is a hidden rate-limit for openclaw bots that open ai doesn't tell. Because of this, I can't use Codex at all.

phuturesh · 3 months ago
> From your logs, this looks like a basic network connectivity issue. We see these frequently with VPNs and proxies, but it might also just be flakiness with your connection. This is not a network issue. Changing model works. I'm pretty sure there is a hidden rate-limit for openclaw bots that open ai doesn't tell. Because of this, I can't use Codex at all.

It seems like I encountered the same situation, but changing model only works for a short while for me.

Nowi5 · 3 months ago

Same issue. Looks like throtteling:

Edited settings.py +9 -0
Reconnecting... 1/5
Reconnecting... 2/5
Edited settings.py +0 -47
Reconnecting... 1/5
Reconnecting... 2/5
Reconnecting... 3/5
hasani114 · 3 months ago

stream disconnected before completion: Connection reset by peer (os error 54)

<img width="887" height="599" alt="Image" src="https://github.com/user-attachments/assets/a7089f65-528e-484a-9f22-442d7f0e3b90" />

AndrewXiGua · 3 months ago

<img width="934" height="468" alt="Image" src="https://github.com/user-attachments/assets/a7a50dcc-a115-454c-a539-0871dc1ea0bd" />

threadID:019d5287-e006-7c20-85a8-8ab299d53d7e

arjitj2 · 3 months ago

Same issue. threadID 019d5f83-d0c4-7ad0-a6cf-5b3b13cc287b

Super frustrating.

windgentle · 2 months ago

我每天也遇到这个问题

telami · 2 months ago

same question

anishp55 · 2 months ago

i am having this issue with the CLI as well, it hard to tell exactly what is going on since i can't get any verbose output from the CLI, but it looks like its not even getting to the point of making any request to the server, since i am not seeing anything coming into my llama.cpp server from the codex cli session. and this is with a local model that i can use with the Zoo Code extension in vscode.

lwen554 · 1 month ago

stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

我一直提示这样,使用的codex客户端昨天下午还好好的,但是突然到了晚上就不行了,一直reconnecting...然后得到上面那一串。。。到底改怎么解决