codex icon indicating copy to clipboard operation
codex copied to clipboard

Re-connecting retry's

Open CrtdLunacy opened this issue 2 months ago • 48 comments

What version of Codex is running?

0.4.26

What subscription do you have?

Plus

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

When Codex starts any task, it performs a few steps (usually 1–3), and then it gets stuck in repeated reconnection attempts. I’ve tried relogging, reinstalling the VS Code plugin, and using a different network connection. Everything else works fine, except Codex keeps failing to reconnect. After reconnecting, Codex can perform a few steps, but then it gets stuck again.

What steps can reproduce the bug?

Just let any task to codex.

What is the expected behavior?

No response

Additional information

Image

request id: 9944e1440bf99f1b-FRA

CrtdLunacy avatar Oct 25 '25 18:10 CrtdLunacy

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #5575
  • #5505
  • #5046
  • #5130
  • #4381

Powered by Codex Action

github-actions[bot] avatar Oct 25 '25 18:10 github-actions[bot]

I had the same issue today but in the CLI, keep getting "reconnecting" and fail with 401 error. Logout and login again fixed it

Meowzz95 avatar Oct 26 '25 06:10 Meowzz95

I had the same issue today but in the CLI, keep getting "reconnecting" and fail with 401 error. Logout and login again fixed it

Relogging helps me for a short time. Also, when I give Codex lightweight tasks, it works fine (not in 100%). However, after some time, Codex starts reconnecting repeatedly and works slower than it did 1–2 weeks ago.

CrtdLunacy avatar Oct 26 '25 10:10 CrtdLunacy

I ran into the same problem. I have upgraded to v0.50.0, but the problem persists. even I performed logout/relogin, ■ exceeded retry limit, last status: 401 Unauthorized, request id: 994aada58ac0b546-LHR

nick-ma avatar Oct 26 '25 14:10 nick-ma

I ran into the same problem. I have upgraded to v0.50.0, but the problem persists. even I performed logout/relogin, ■ exceeded retry limit, last status: 401 Unauthorized, request id: 994aada58ac0b546-LHR

same for me : exceeded retry limit, last status: 401 Unauthorized, request id: 9951233c8c203108-MRS

ByKyZo avatar Oct 27 '25 09:10 ByKyZo

Had the same issue, logged off and logged in again and it works. However, even the browser login failed a couple of times. I believe there is some transient connectivity issue OpenAi.

AlexPlom avatar Oct 27 '25 21:10 AlexPlom

I have upgraded to v0.50.0. Had the same issue. When the connection is possible, reply to the same question multiple times, up to 5 times.

tonyjing1978 avatar Oct 28 '25 09:10 tonyjing1978

same

scarletkc avatar Oct 29 '25 14:10 scarletkc

Same issue on windows 11... can't get it to work (chatgpt plus)

StefanRademakers avatar Oct 30 '25 08:10 StefanRademakers

same - for me this occurs irrespective of profile/ model provider - I tried logout/login and selected profiles from GPT-Plus, API, and Open-Router (both GPT-5-Codex and non-OpenAI models). Issue persisted irrespective, so seemingly not a capacity issue.

There appears to be no trigger mechanism - sometimes I get 5x retries immediately on login, sometimes whilst its running tasks

mgscox avatar Oct 30 '25 10:10 mgscox

Same issue on ubuntu 24.04. Logout and login again cannot fix this reconnecting issue for me. And I found that this seldom occurs if using gpt-5 model, always occurs if using gpt-codex model

Caibao7 avatar Oct 30 '25 12:10 Caibao7

I think there are a couple of different issues being discussed in this thread.

  1. "401 Unauthorized" errors that go away after logout/login
  2. "Re-connecting" errors that are sporadic but persist after logout/login

We think that we understand the 401's. This problem is related to token refresh, and we think we've fixed that issue in the latest release. Please let us know if you are still seeing it.

The "Re-connecting" error is typically indicative of a flaky network connection, but we'd like to confirm that it's not a bug or infra issue on our end. If you're seeing this and do not think it's a network connectivity issue, please use the /feedback command in the CLI to report it. That will help us investigate.

etraut-openai avatar Oct 30 '25 15:10 etraut-openai

Ok, ty, I’ll keep monitoring. For the last 3 days, there have been 0 reconnects issues. Network settings also haven’t changed, so I can’t confirm whether the issue was related to the network.

CrtdLunacy avatar Oct 30 '25 15:10 CrtdLunacy

It's not a flaky network issue. It's related somehow to the task history. I have one task conversation that is stuck with this thing, but my other tasks works perfectly fine. I think it started happening in this task after I've attached a very large file

Einhorntom avatar Oct 30 '25 16:10 Einhorntom

I think it started happening in this task after I've attached a very large file

That's a really useful clue!

I'm going to reopen the issue because I think we don't yet understand the root cause.

etraut-openai avatar Oct 30 '25 16:10 etraut-openai

@etraut-openai I can definitely say that this phenomenon shows up when the OpenAI models deployed in Azure are using wire_api="responses". All models using wire_api="chat" are not affected.

https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/codex?tabs=npm

tmeckel avatar Nov 03 '25 19:11 tmeckel

same issue

xxz7909 avatar Nov 04 '25 00:11 xxz7909

stream disconnected before completion: Transport error: Error while reading the server response: error decoding response body, request id: 99901e4559c0eb86-NRT

xxz7909 avatar Nov 04 '25 00:11 xxz7909

Thanks for the bug report. We think we understand the cause of both the 401's and the "Re-connecting" messages, and a fix will be included in an upcoming release — most likely 0.4.37 or prerelease version 0.5.37.

etraut-openai avatar Nov 05 '25 21:11 etraut-openai

Installation Identifier openai.chatgpt Version 0.5.36 Last Updated 5 min

Image

illusive5943 avatar Nov 06 '25 01:11 illusive5943

@illusive5943, the fix isn't in 0.5.36 yet. Should be in the next release. ETA: tomorrow.

etraut-openai avatar Nov 06 '25 01:11 etraut-openai

is there any know workaround ?

gmanarmaia avatar Nov 06 '25 06:11 gmanarmaia

me too. hopefully the next version will address this.

tahitimoon avatar Nov 06 '25 06:11 tahitimoon

is there any know workaround ?

Try logging out and logging back in.

etraut-openai avatar Nov 06 '25 08:11 etraut-openai

is there any know workaround ?

Try logging out and logging back in. Thanks for the reply It does not work ... tried this multiple times ... will 0.5.37 be out any time soon (with a fix)

gmanarmaia avatar Nov 06 '25 17:11 gmanarmaia

@gmanarmaia, if logging out doesn't clear the error for you, then 0.5.37 will not solve the problem you're seeing. I'll reopen this issue since it appears that there are multiple issues at play here.

etraut-openai avatar Nov 06 '25 17:11 etraut-openai

@gmanarmaia, if logging out doesn't clear the error for you, then 0.5.37 will not solve the problem you're seeing. I'll reopen this issue since it appears that there are multiple issues at play here.

thanks @etraut-openai for the response (atleast i will not be eagerly waiting for 0.5.37 now ... and hoping it will resolve my issue) ... are there any workarounds that i should try ? ... i clearing cache... logout/login... uninstall/reinstall ... anything else ?

any help is greatly appreciated !!

gmanarmaia avatar Nov 06 '25 18:11 gmanarmaia

@gmanarmaia, which platform are you on? The original poster in this thread is using MacOS. Are you as well? If you suspect that this is a recent regression in the extension, you could try downgrading to earlier versions. If you find that an earlier version works, that would be a really useful clue.

etraut-openai avatar Nov 06 '25 18:11 etraut-openai

@gmanarmaia, which platform are you on? The original poster in this thread is using MacOS. Are you as well? If you suspect that this is a recent regression in the extension, you could try downgrading to earlier versions. If you find that an earlier version works, that would be a really useful clue.

I am on MacOS too ... do you have some suggested versions that i should try ... i can give it a shot ... i switched so many versions... so i dont know really know what i should try ... any hits will be great !

gmanarmaia avatar Nov 06 '25 21:11 gmanarmaia

@etraut-openai - i have tried going as back as 0.4.30 and many of the old and older versions no luck ... may be it is a serverside mcpserver issue ? do we have any eta on the fix version ?

gmanarmaia avatar Nov 07 '25 05:11 gmanarmaia