codex icon indicating copy to clipboard operation
codex copied to clipboard

Codex CLI 0.30 Only -  stream error: unexpected status 400 Bad Request: {"detail":"Instructions are not valid"};

Open rwjdk opened this issue 1 year ago • 24 comments

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

rwjdk avatar Sep 05 '25 22:09 rwjdk

same

himomohi avatar Sep 05 '25 22:09 himomohi

Same here

Image

SystemSculpt avatar Sep 05 '25 22:09 SystemSculpt

Same on Mac OS after update by npm i -g @openai/codex P.s. It's solved! 🎉🎉🎉

Image

adv0cat avatar Sep 05 '25 22:09 adv0cat

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...

rwjdk avatar Sep 05 '25 22:09 rwjdk

same here

Thsandorh avatar Sep 05 '25 22:09 Thsandorh

Yep, same issue here. They've probably broken the system instruction the backend API validates on requests.

ben-vargas avatar Sep 05 '25 22:09 ben-vargas

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]

diezep avatar Sep 05 '25 22:09 diezep

same here

sashd3 avatar Sep 05 '25 22:09 sashd3

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.

ben-vargas avatar Sep 05 '25 23:09 ben-vargas

Tried to delete my Agent.md but did not resolve, so it is not our Instructions that are invalid

rwjdk avatar Sep 05 '25 23:09 rwjdk

Same here.

Ixe1 avatar Sep 05 '25 23:09 Ixe1

same

s0lana69 avatar Sep 05 '25 23:09 s0lana69

+1 on linux

Alfredo-Sandoval avatar Sep 05 '25 23:09 Alfredo-Sandoval

Seems OpenAI endpoits have been changed. It's fixed at 0.30.0.

diezep avatar Sep 05 '25 23:09 diezep

It's solved. Everyone, try again

himomohi avatar Sep 05 '25 23:09 himomohi

Hi folks - this should be fixed. Please let us know if you're still hitting errors!

dylan-hurd-oai avatar Sep 05 '25 23:09 dylan-hurd-oai

Confirmed fixed for me.

ben-vargas avatar Sep 05 '25 23:09 ben-vargas

I see this issue after updating it to CLI 0.36.0 on Linux

akkinra avatar Sep 17 '25 12:09 akkinra

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…

mgscox avatar Sep 26 '25 18:09 mgscox

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
  }
}

syshex avatar Sep 29 '25 15:09 syshex