Cannot progress past first chat: Missing required parameter: 'input[2].id'

Resolved 💬 31 comments Opened Sep 11, 2025 by abazabaaa Closed Sep 16, 2025
💡 Likely answer: A maintainer (pakrym-oai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.34.0

Which model were you using?

gpt-5

What platform is your computer?

Linux 4.18.0-553.el8_10.x86_64 x86_64 x86_64

What steps can reproduce the bug?

>_ You are using OpenAI Codex in /ap/bin

 To get started, describe a task or try one of these commands:

 /init - create an AGENTS.md file with instructions for Codex
 /status - show current session configuration and token usage
 /approvals - choose what Codex can do without approval
 /model - choose what model and reasoning effort to use

▌hi

> Hey! How can I help today?

▌hi

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Missing required parameter: 'input[2].id'.",
    "type": "invalid_request_error",
    "param": "input[2].id",
    "code": "missing_required_parameter"
  }
}; retrying 1/5 in 200ms…

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Missing required parameter: 'input[2].id'.",
    "type": "invalid_request_error",
    "param": "input[2].id",
    "code": "missing_required_parameter"
  }
}; retrying 2/5 in 431ms…

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

codex-cli 0.31.0 Works without this issue.

model_provider = "azure"
model = "gpt-5"
sandbox_mode = "danger-full-access"
preferred_auth_method = "apikey"

[model_providers.azure]
name = "Azure"
base_url = "https://xxxxxx.azure-api.net/xxxxx/openai"
query_params = { api-version = "2025-04-01-preview" }
wire_api = "responses"
env_http_headers = { api-key = "OPENAI_API_KEY" }

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

View original on GitHub ↗

31 Comments

Chetansuri7 · 10 months ago

facing same issue. had to downgrade to npm install -g @openai/codex@0.31.0 to make it work.

daklik · 10 months ago

Same issue here - had to revert also to 0.31.0.
Azure OpenAI, GPT-5-mini, api version 2025-04-01-preview, sandbox danger-full-access.

doggy8088 · 10 months ago

Same issue here. I tried 0.32.0, 0.33.0, 0.34.0 which are all failed. Only 0.31.0 works. Please fix it.

<img width="1077" height="1042" alt="Image" src="https://github.com/user-attachments/assets/57d083eb-990b-4daf-81b9-4a87aa1e789b" />

bro4all · 10 months ago

funny that on .31 I have this error:

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Item with id 'rs_68c2f345755c819697feb282e2fedf9509f1adb864821dc1' not found. Items are not persisted when `store` is
set to false. Try again with `store` set to true, or remove this item from your input.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
  }

which I know that @pakrym-oai patched in the later versions but I can't use anything further than .29 with my setup.

Azure api integration really need to be documented and tested every release

rxreyn3 · 10 months ago

This guy appears to be the cause. https://github.com/openai/codex/pull/3390

john-lu-ptc · 10 months ago

Same issue!

intherejeet · 10 months ago

same issue

Einorde · 10 months ago

same issue, and can't downgrade with homebrew using brew install codex@0.31.0

DevOps-zhuang · 10 months ago

It still doesn't work even downgrade to 0.31 :-(

my setting is like:
env_key = "AZURE_OPENAI_API_KEY"
query_params = { api-version = "2025-04-01-preview" }

and the result is:
unexpected status 400 Bad Request: {"error":
{"code":"BadRequest","message":"API version not supported"}}

rxreyn3 · 10 months ago
It still doesn't work even downgrade to 0.31 :-( my setting is like: env_key = "AZURE_OPENAI_API_KEY" query_params = { api-version = "2025-04-01-preview" } and the result is: unexpected status 400 Bad Request: {"error": {"code":"BadRequest","message":"API version not supported"}}

That's a different error than what we're chatting about. You might want to search for another related issue or at least post all the important bits from config.

supernitin · 10 months ago

Azure is the red headed step child around here :(

lperezeverfield · 10 months ago

same issue

remiminnebo · 10 months ago

same issue

Habi95 · 10 months ago

same issue

cpunella · 10 months ago

same! Please we need a fix soon!

dingkwang · 10 months ago

Same Issue today!

pakrym-oai contributor · 10 months ago

Can you try the latest version please? Are you still getting the same error?

CezaryKlus · 10 months ago

@pakrym-oai same error

\"Missing required parameter: 'input[2].id'.\"

pakrym-oai contributor · 10 months ago

We had to apply some workaround for Azure API issues. We detect azure by looking at the host name ("openai.azure.",
"cognitiveservices.azure.","aoai.azure.","azure-api.", "azurefd.") or the config name (looking for model provider named azure).

Does this match your config?

rxreyn3 · 10 months ago

@pakrym-oai I reverted https://github.com/openai/codex/pull/3390 and build locally to get around this myself.

ksquarekumar · 10 months ago

Can confirm 0.36.0 also has this issue

model = "<YOUR-DEPLOYMENT-NAME>"
model_provider = "<YOUR-PROVIDER-NAME>"
profile = "<YOUR-PROFILE-NAME>"

[model_providers."<YOUR-PROVIDER-NAME>"]
name = "Azure"
base_url = "https://<YOUR-RESOURCE-NAME>.openai.azure.com/openai/v1/"
env_key = "AZURE_OPENAI_API_KEY"
wire_api = "responses" # Changed from "chat", works as of v1 api GA, recommended by openAI ?
request_max_retries = 4
stream_max_retries = 10
stream_idle_timeout_ms = 300000

[profiles."<YOUR-PROFILE-NAME>"]
model = "<YOUR-DEPLOYMENT-NAME>"
model_provider = "<YOUR-PROVIDER-NAME>"

While this works for me, and resolves the need to specify API Versions, it started breaking again with

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Missing required parameter: 'input[3].id'.",
    "type": "invalid_request_error",
    "param": "input[3].id",
    "code": "missing_required_parameter"
  }
}; retrying 2/10 in 418ms…

don't pick from /models though else it gives ⚠️ stream error: unexpected status 404 Not Found: {"error":{"code":"DeploymentNotFound"...}} errors. [This is it's own set of unresolved errors and config jank]

Azure support is really chaotic.

Jer-y · 10 months ago
Can you try the latest version please? Are you still getting the same error?

0.36.0 works for me. Below are my toml

[model_providers.azure]
name = "Azure"
base_url = "https://<AOAI>.openai.azure.com/openai/"
env_key = "AZURE_OPENAI_API_KEY"  # Or "OPENAI_API_KEY", whichever you use.
query_params = { api-version = "2025-04-01-preview" }
wire_api = "responses"
lordmauve · 10 months ago
We had to apply some workaround for Azure API issues. We detect azure by looking at the host name ("openai.azure.",

"cognitiveservices.azure.","aoai.azure.","azure-api.", "azurefd.") or the config name (looking for model provider named azure).

@pakrym-oai My firm proxies Azure for various reasons so a domain approach cannot work.

The name approach works but is very peculiar because name doesn't _look_ like a functional field, it looks like it's offered to help maintain your config file.

Because it's an exact match I can't even set the name to "Azure via internal proxy" or something.

Isn't the best way to handle this to create a wire_api for Azure?

wire_api = "azure-responses"
pakrym-oai contributor · 10 months ago
Isn't the best way to handle this to create a wire_api for Azure?

It is an option but we are trying to avoid proliferating wire formats especially for something that is a bug in Azure API implementation and has to be fixed soon.

doggy8088 · 10 months ago

I believe 0.36.0 fixed the issue. Just run the following command to install latest version of Codex CLI:

npm i -g @openai/codex
pakrym-oai contributor · 10 months ago

I'm going to close the issue. Please install Codex CLI 0.36 and use the exact definition from https://github.com/openai/openai/pull/474542 (we're matching azure provider by name and on Azure host names to apply a workaround for a bug in Azure implementation of Responses API).

tkellogg · 10 months ago
I believe 0.36.0 fixed the issue. Just run the following command to install latest version of Codex CLI: npm i -g @openai/codex

This works for me. Thanks!

emerzon · 10 months ago

This workaround does not solve cases where the connection to Azure is routed via a Proxy (Ie. LiteLLM).
@pakrym-oai , please reopen the issue
As suggested above, having something like wire_api = "azure-responses" would be a more robust workaround

rxreyn3 · 10 months ago

Is anyone else seeing this on .36 only when resuming sessions? I'm wondering if I should create another issue.

understood-the-assignment · 10 months ago
Please install Codex CLI 0.36 and use the exact definition from https://github.com/openai/openai/pull/474542

@pakrym-oai That link is broken, I am guessing that you mean https://github.com/openai/codex/pull/3542.

This workaround does not solve cases where the connection to Azure is routed via a Proxy (Ie. LiteLLM).

Here is the code:

https://github.com/openai/codex/blob/9b18875a42c6453ff79a8ae7a658e5e615f7b353/codex-rs/core/src/model_provider_info.rs#L165-L178

@emerzon I think it should be possible to get it working in your situation. The code checks if name is azure OR if the URL contains some substrings, which looks flexible enough (i.e. just add your LiteLLM configuration under a [model_providers.azure] section in config.toml).

paulopacitti · 9 months ago

This indeed is an issue that extends to litellm. I'm working on a suggestion of a config option to force this behaviour of sending reasoning ids aka store: true. I'll link to this issue soon. Thanks for the discussion on this issue, even that's closed status, it helped a lot to troubleshoot this.

cc: @FelipeRodriguesGare