Unexpected status 400 Bad Request errors after upgrading to codex 0.52 in WIndows

Resolved 💬 14 comments Opened Oct 30, 2025 by Arthur742Ramos Closed Jan 7, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

14 Comments

github-actions[bot] contributor · 8 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #5778
  • #4184
  • #4047

Powered by Codex Action

erickirsten · 8 months ago

Getting the same error on MacOS. Reverting back to 0.50.0 solved it.

etraut-openai contributor · 8 months ago

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.

voytas75 · 8 months ago

v0.53.0 - no 400 error - works seamless with Azure

supernitin · 8 months ago
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.

It would be great if Azure OpenAI endpoint was given equal footing in testing.

semantic-developer · 8 months ago

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

voytas75 · 8 months ago
@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:

model = "azure"
profile = "gpt-5-codex-medium"

[model_providers.azure]
name = "Azure"
# Make sure you set the appropriate subdomain for this URL.
base_url = "https://<project>.openai.azure.com/openai"
env_key = "AZURE_OPENAI_API_KEY"
query_params = { api-version = "2025-04-01-preview" }
wire_api = "responses"

[profiles.gpt-5-codex-medium]
model_provider = "azure"
model = "gpt-5-codex"
model_reasoning_effort = "medium"
model_reasoning_summary = "detailed"

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

bensalem22 · 8 months ago

I have the same issue, any workarounds?

etraut-openai contributor · 6 months ago

I think this issue was caused by a delay in Azure rolling out the latest repsonses endpoint 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.

paulhshort · 6 months ago
I think this issue was caused by a delay in Azure rolling out the latest repsonses endpoint 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" />

etraut-openai contributor · 6 months ago

@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 /feedback slash command to upload your logs and session details and post the thread ID here.

paulhshort · 6 months ago
@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 /feedback slash 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`

etraut-openai contributor · 6 months ago

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.

Resonious · 5 months ago

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.