Unexpected status 400 Bad Request errors after upgrading to codex 0.52 in WIndows
What version of Codex is running?
0.52.0
What subscription do you have?
Azure OpenAI
Which model were you using?
gpt-5-codex high using Azure OpenAI endpoint
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
This start happening after upgrading to the new 0.52 version.
After starting codex and setting it to full approval, I send it a first message and it works correctly. After the first message, if I ask a follow-up I get this error:
unexpected status 400 Bad Request: {
"error": {
"message": "Item 'msg_0cfdfdab81d62527006903d84f801c8196959e9fb1a4ae2e8e' of type 'message' was provided without its
required 'reasoning' item: 'rs_0cfdfdab81d62527006903d84db7a48196b2785d8ed27fbcee'.",
"type": "invalid_request_error",
"param": "input",
"code": null
}
}
What steps can reproduce the bug?
In a WIndows environment, ask a question to codex and then a follow up question. It fails after the follow up.
What is the expected behavior?
Codex not crashing when asking follow up questions
Additional information
_No response_
14 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Getting the same error on MacOS. Reverting back to 0.50.0 solved it.
Thanks for the bug report. It sounds like everyone who is affected by this problem is using the Azure OpenAI endpoint.
If you are experiencing this problem but _not_ using the Azure OpenAI endpoint, please let us know.
v0.53.0 - no 400 error - works seamless with Azure
It would be great if Azure OpenAI endpoint was given equal footing in testing.
@voytas75 how is this working for you? I am having no luck with azure openai models whatsoever - trying with codex-mini and running on windows WSL 2 - I am also on v .53
model_provider = "azure"
model = "codex-mini" # this must match your Azure deployment name
preferred_auth_method = "apikey"
[model_providers.azure]
name = "Azure"
base_url = "https://mydomain.cognitiveservices.azure.com/openai"
env_key = "AZURE_OPENAI_API_KEY"
query_params = { api-version = "2025-04-01-preview" }
wire_api = "responses"
model_reasoning_effort = "high"
I receive:
unexpected status 400 Bad Request: {
"error": {
"message": "Invalid value: 'custom'",
"type": "invalid_request_error",
"param": "tools",
"code": "unknown_parameter"
}
}
wsl2; 0.55 now but since 53 is seamlessly. i use other endpoint:
@semantic-developer i used to use my own deployment names but in a lot of cases problems gone when i cchange to default name like gpt-4.1. you can check it too.
I have the same issue, any workarounds?
I think this issue was caused by a delay in Azure rolling out the latest
repsonsesendpoint updates. They base their code on OpenAI's endpoint code, but there is often a lag. This issue should no longer be a problem. If you're still seeing it when using Azure, let us know.I am still frequently running into this, using gpt-5.2 via Azure OAI and codex v.0.77.0
<img width="2548" height="505" alt="Image" src="https://github.com/user-attachments/assets/242f1bea-114a-413d-8909-bfd0f7888c9d" />
@paulhshort, do you have
wire_api = "responses"in your model provider definition, or are you using the older "chat" wire API? We've deprecated the "chat" API and will soon be removing support entirely.If that doesn't explain the problem, then we'll need to investigate further. If you see the problem again, please use the
/feedbackslash command to upload your logs and session details and post the thread ID here.Yep I do indeed - this is what I have in my config.toml (removed our Azure OAI deployment name):
`
model = "gpt-5.2"
model_provider = "azure"
model_reasoning_effort = "xhigh"
model_reasoning_summary_format = "experimental"
approval_policy = "never"
sandbox_mode = "danger-full-access"
exec_timeout_ms = 900000 # 15 minutes
rmcp_client = true
[model_providers.azure]
name = "azure"
base_url = "https://{Our Azure OAI Deployment}.openai.azure.com/openai/v1/"
env_key = "AZURE_OPENAI_API_KEY"
wire_api = "responses"
preferred_auth_method = "apikey"
model_reasoning_summary = "auto"
model_verbosity = "medium"
[features]
streamable_shell = true # enable the streamable exec tool
unified_exec = true # enable the unified exec tool
apply_patch_freeform = true
shell_snapshot = true`
OK, thanks for confirming.
I'm not aware of any reports of this problem occurring with OpenAI-hosted endpoints, which suggests this might be a problem with the Azure endpoint. You may want to report the issue to the Azure team.
I'm getting this on the openai hosted endpoints. It's through OpenClaw though so I don't know enough about the internals to provide more detail.