🖐 unexpected status 400 Bad Request
Resolved 💬 4 comments Opened Aug 19, 2025 by Qualzz Closed Sep 6, 2025
💡 Likely answer: A maintainer (dylan-hurd-oai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.22.0
Which model were you using?
gpt-5
What platform is your computer?
Linux 6.14.0-27-generic x86_64 x86_64
What steps can reproduce the bug?
codex just output:
🖐 unexpected status 400 Bad Request: {
"error": {
"message": "Invalid type for 'input': expected string, but got array.",
"type": "invalid_request_error",
"param": "input",
"code": "invalid_type"
}
}
no matter the request
Additional information
I'm logged in using my GPT pro subscription.
4 Comments
I found the issue. Codex works fine in other folders, but if there’s a
.envfile in the folder containing anOPENAI_BASE_URLvariable, Codex seems to pick it up, which ends up interfering with its queries.Exact same issue here! Thanks for the fix.
+1
Same issue. renamed the .env file fixed the issue instantly
While the env var is different, the root cause appears to be the same as #2341 - going to close as duplicate