Skip to content

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

Closed

Description

@Arthur742Ramos

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

Activity

  1. added
    bug
    on Oct 30, 2025
  2. changed the title [-]Unexpected status 400 Bad Request errors after upgrading to codex 0.52[/-] [+]Unexpected status 400 Bad Request errors after upgrading to codex 0.52 in WIndows[/+] on Oct 30, 2025
  3. added
    azure
    windows-os
    on Oct 30, 2025
  4. erickirsten commented on Oct 30, 2025

    @erickirsten

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

  5. etraut-openai commented on Oct 30, 2025

    @etraut-openai
    Contributor

    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.

  6. voytas75 commented on Oct 31, 2025

    @voytas75

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

  7. supernitin commented on Oct 31, 2025

    @supernitin

    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.

  8. semantic-developer commented on Nov 4, 2025

    @semantic-developer

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

  9. voytas75 commented on Nov 5, 2025

    @voytas75

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

  10. bensalem22 commented on Nov 7, 2025

    @bensalem22

    I have the same issue, any workarounds?

  11. etraut-openai commented on Jan 7, 2026

    @etraut-openai
    Contributor

    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.

  12. paulhshort commented on Jan 8, 2026

    @paulhshort

    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

    Image
  13. etraut-openai commented on Jan 8, 2026

    @etraut-openai
    Contributor

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

  14. paulhshort commented on Jan 8, 2026

    @paulhshort

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

  15. etraut-openai commented on Jan 8, 2026

    @etraut-openai
    Contributor

    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.

  16. Resonious commented on Feb 4, 2026

    @Resonious

    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.

  17. locked and limited conversation to collaborators on Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    azurebugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions