Re-connecting retry's
Resolved 💬 49 comments Opened Oct 25, 2025 by CrtdLunacy Closed Jan 13, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
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
<img width="456" height="346" alt="Image" src="https://github.com/user-attachments/assets/925fc337-5e9c-4d51-b383-45514e437aa8" />
request id: 9944e1440bf99f1b-FRA
49 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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.
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
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.
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.
same
Same issue on windows 11... can't get it to work (chatgpt plus)
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
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
I think there are a couple of different issues being discussed in this thread.
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
/feedbackcommand in the CLI to report it. That will help us investigate.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.
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
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 I can definitely say that this phenomenon shows up when the OpenAI models deployed in Azure are using
wire_api="responses". All models usingwire_api="chat"are not affected.https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/codex?tabs=npm
same issue
stream disconnected before completion: Transport error: Error while reading the server response: error decoding response body, request id: 99901e4559c0eb86-NRT
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.
Installation
Identifier
openai.chatgpt
Version
0.5.36
Last Updated
5 min
<img width="537" height="457" alt="Image" src="https://github.com/user-attachments/assets/8558c5ed-b06e-4a1e-902d-65a1aebf25f9" />
@illusive5943, the fix isn't in 0.5.36 yet. Should be in the next release. ETA: tomorrow.
is there any know workaround ?
me too. hopefully the next version will address this.
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, 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, 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 !
@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 ?
I encountered this issue with MacOS, both Cursor and VScode extensions. Logging out and in, reinstalling, quitting the apps didn't work.
What error do you see after the stream of
Re-connectingmessages? That will tell you the reason it's not able to connect.For example, in one of the screen shots in this thread, this message reads "error sending request for url (http://localhost:60904//responses)". That means codex is trying to contact the "responses" endpoint (which is used to get responses from the model) on a localhost endpoint. This is probably due to misconfiguration in
.codex/config.toml.@etraut-openai
Unfortunately it's like this:
Thinking
Re-connecting... 1/5
Re-connecting... 2/5
Re-connecting... 3/5
Re-connecting... 4/5
Re-connecting... 5/5
Failed
@Haruki-Shibuya, hmm, that error message is definitely not very helpful. Here's a thought. Do you have the Codex CLI installed on your system? Could you try running it to see if it provides a better error message in this case? The VS Code Extension is a wrapper around the CLI, and I suspect that the error message is getting dropped somewhere. If we can get a better error message, that will help us diagnose the root cause of your connection problem.
On my end its, came after a png was badly loaded, maybe causing it to glitch forever and ruining the conversation (in my opinion)
<img width="507" height="782" alt="Image" src="https://github.com/user-attachments/assets/36727f8d-61de-44b1-9d60-47e727031785" />
unexpected status 400 Bad Request: { "error": { "message": "Invalid 'input[201].content[2].image_url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got empty base64-encoded bytes.", "type": "invalid_request_error", "param": "input[201].content[2].image_url", "code": "invalid_value" } }
seems like I'm having the same issue. I ask a question, it says 'Thinking...', but it tries to reconnect and always ends with the error `Connection failed: error sending request for url (https://chatgpt.com/backend-api/codex/responses). I'm using v0.4.38 of the vscode codex extension (according to the extension it auto-updated '1 day ago' and yesterday I didn't have this issue) with model GPT-5-Codex. I've tried restarting vscode, logging out/logging in from the extension, and uninstalling and reinstalling the extension but see the same behavior.
<img width="278" height="210" alt="Image" src="https://github.com/user-attachments/assets/71f50325-211f-47ee-860a-aae3723afa1b" />
@etraut-openai same issue
On a remote server, the codex cli works fine, but when using the VS Code Codex extension, it just gets stuck on 'thinking' like in the picture.
<img width="351" height="143" alt="Image" src="https://github.com/user-attachments/assets/f6da8b94-3c17-4ce9-bdde-44c2fc6539d2" />
<img width="351" height="143" alt="Image" src="https://github.com/user-attachments/assets/233e99dc-3a84-4bc4-9ae5-aa337ef1bb72" />
I'm having this same error except on Arch. Logging out of codex led to denied authentication when trying to log back in. I tried to use an API key instead and it still gets hung up on "Reconnecting...".
Same. Usually for Code-X model buf occasionlly for gpt5
I'm 🤔 having the same error. Sometimes my query goes through but mostly I get the same 5 reconnection attempts and then the response error as stated by many of the users above.
I'm having the same issue after switching today from user-based login to API key
@etraut-openai just wondering, is there some diagnostic we can submit somewhere to help troubleshooting? The issue went away for me but came back for a day or two last week and then disappeared again.
Same issue here. Using the newest Codex CLI 0.63.0
@etraut-openai I can say that when I set
model_reasoning_summary = "none"codexinstantly goes toreconnecting. I've deployedgpt-5.1-codexon Azure Foundry. When I remove this setting evenDeepSeek-V3-0324andDeepSeek-R1-0528are working withcodex😄~~Are any of you experiencing this issue logging into ChatGPT with SSO by chance?~~ Latest 0.72.0 fixed it for me
Is this the "solution":
model_reasoning_summary = "none"? Or is there going to be an update to the code? I'm still getting the constant reconnecting issue.The
Reconnecting...behavior occurs any time the codex harness receives an error from the model that is not categorized as a "fatal" error. There are dozens of underlying reasons why this can occur. If the call fails five times, codex will stop retrying and print out the error information. That error message is key to diagnosing the problem you're seeing. If you'd like additional help diagnosing the underlying problem, you can upload your logs and session information using the/feedbackslash command and post your thread ID here or in a new bug report.This comment in 7285 has been very helpful for me for getting past reconnecting issues
@ChrisEdwards:
The toml.config hacks I'm currently using with Azure OpenAI include stuff like this:
Also, getting Microsoft to increase the allowed quota/tokens per minute for deployed AI foundry models accessed in Codex to much higher than the default was required.
I'm going to close this issue because I don't think it's useful at this point. "Re-connecting retry's" covers a lot of different cases. We've addressed many of them above, but there may be some lingering ones. If you encounter a persistent "Reconnecting" message without an obvious cause (like connectivity issues), please use the
/feedbackcommand to open a new bug report.