Codex CLI 0.30 Only - stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"};
What version of Codex is running?
0.30
Which model were you using?
gtp-5 medium
What platform is your computer?
Windows 11
What steps can reproduce the bug?
- Install 0.30
- run Codex
- prompt 'hi' or any other message
What is the expected behavior?
That Codex answer back or begin coding
What do you see instead?
You get this:
▌hi
⚠️ stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"}; retrying 1/5 in 193ms…
⚠️ stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"}; retrying 2/5 in 373ms…
⚠️ stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"}; retrying 3/5 in 776ms…
⚠️ stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"}; retrying 4/5 in 1.718s…
⚠️ stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"}; retrying 5/5 in 2.91s…
🖐 unexpected status 400 Bad Request: {"detail":"Instructions are not valid"}
Additional information
- Installed from the download as not ready on npm yet
- Error happens both in normal Windows and WSL
same
Same here
Same on Mac OS after update by npm i -g @openai/codex
P.s. It's solved! 🎉🎉🎉
Same on Mac OS after update by
npm i -g @openai/codex
Seems we have a FUBAR build on both Windows and Mac... So at least we will properly get a quick fix...
same here
Yep, same issue here. They've probably broken the system instruction the backend API validates on requests.
Seems specific to 0.30.0, while a fix arrives (or update on OpenAI endpoints), workaround is going back to version 0.29.0:
npm install -g @openai/[email protected]
same here
Likely broken by https://github.com/openai/codex/pull/3122 where they modified prompt.md which is strictly validated by the backend endpoints to validate Plus/Pro subscriber use through codex cli.
Tried to delete my Agent.md but did not resolve, so it is not our Instructions that are invalid
Same here.
same
+1 on linux
Seems OpenAI endpoits have been changed. It's fixed at 0.30.0.
It's solved. Everyone, try again
Hi folks - this should be fixed. Please let us know if you're still hitting errors!
Confirmed fixed for me.
I see this issue after updating it to CLI 0.36.0 on Linux
similar - codex-cli 0.41.0
tream error: unexpected status 400 Bad Request: {
"error": {
"message": "The encrypted content gAAA...o4o= could not be verified.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}; retrying 1/5 in 194ms…
Yes, getting the same as @mgscox . This happens when I use openai api key for the requests.
unexpected status 400 Bad Request: {
"error": {
"message": "The encrypted content gAAA...3bk= could not be verified.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}