⚠️ Connection closed prematurely while waiting for the model. Please try again.

Resolved 💬 10 comments Opened May 19, 2025 by vannarho-fas Closed Aug 7, 2025

What version of Codex is running?

0.1.2505172129

Which model were you using?

codex-mini-latest

What platform is your computer?

Darwin 24.4.0 arm64 arm

What steps can reproduce the bug?

It appears intermittently (20x times a day) - I do not know what triggers it

What is the expected behavior?

It stops the current task - requires a new prompt.

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

10 Comments

vannarho-fas · 1 year ago

p.s. I note that these errors occur using both codex-mini-latest and o4-mini but not o3.

vannarho-fas · 1 year ago

p.s. in case it helps, once the error occurs, it cannot recover. This makes codex virtually unusable.

system
Let me know if you’d like me to apply these changes directly in code (and add unit-tests/documentation references to the CRE paragraphs), or if you have any questions
about the corrective patches.

user
ok patch the files

system
⚠️ Connection closed prematurely while waiting for the model. Please try again.
user
keep going

system
⚠️ Connection closed prematurely while waiting for the model. Please try again.
user
keep going

system
⚠️ Connection closed prematurely while waiting for the model. Please try again.

joaqo · 1 year ago

Same thing here.

vannarho-fas · 1 year ago

Also, if I revert to version 0.1.2505171619 when I hit this error with o4-mini, it will reconnect and continue to work.

guillemmont · 1 year ago

same here!

yakzan · 1 year ago

me as well, using 4.1 with codex version 0.1.2505172129

vannarho-fas · 1 year ago

@yakzan @guillemmont @joaqo - In case it helps you, I have regressed to 0.1.2505140839 and found that this version _mostly_ avoids this error and if it does occur it _mostly_ allows recovery / to continue without closing the session. I find the latest release is unusable. Sometimes it works for hours without the error, other times it throws the error constantly. It's moody ;-)

rr- · 1 year ago

Unfortunately even reverting to the mentioned version causes the codex to be completely unusable for me.

guillemmont · 1 year ago

same here, thanks @vannarho-fas for the tip but it is not working for me neither!

codex-maintainers · 11 months ago

Thank you for the feedback! Please try using the latest version of Codex CLI, as we're actively addressing issues in our new Rust implementation. If the problem persists, let us know.