Item 'rs...' of type 'reasoning' was provided without its required following item.

Resolved 💬 6 comments Opened Jul 10, 2025 by kingdomseed Closed Oct 28, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.4.0 (and still occuring on 0.5.0)

Which model were you using?

codex-mini, o3-pro, o3

What platform is your computer?

Darwin 24.5.0 arm64 arm

What steps can reproduce the bug?

Configure Codex RS to run using a similar Azure based config (attached)

config.txt (Replace .txt with .toml)

Launch Codex with codex in terminal or codex or codex --model o3, etc

Ask Codex to review some files. The review may or may not be completed.

Send a follow up message and receive this error:

│ERROR: unexpected status 400 Bad Request: {  "error": {    "message": "Item 'rs_686f8282e47881a3aeaf14b2f7ece9ec0a551ee45964858e' of type 'reasoning' was provided without its required following item.",    "type": "invalid_request_error",    "param":█│
│"input",    "code": null  }} 

What is the expected behavior?

Codex should continue working on the problem and I should be able to send follow up messages.

What do you see instead?

The following error 10 times (10/10 retries)

│ERROR: unexpected status 400 Bad Request: {  "error": {    "message": "Item 'rs_686f8282e47881a3aeaf14b2f7ece9ec0a551ee45964858e' of type 'reasoning' was provided without its required following item.",    "type": "invalid_request_error",    "param":█│
│"input",    "code": null  }} 

Additional information

No further chats can be sent--the CLI must be terminated and started again with codex. This can happen after the first message or a few messages.

View original on GitHub ↗

6 Comments

kingdomseed · 1 year ago

May have discovered a workaround:

model_reasoning_effort = "none"

Explicitly setting this to none seems to work. This might have to do with incompatibilties on Azure's end. A conversation with ChatGPT revealed this so take this with a grain of salt (or an entire salt shaker's worth). I haven't had time to look into this more but I've got codex working now:

From ChatGPT

  1. \\Codex 0.4–0.5 automatically requests a \\*reasoning trace* for every o‑series / codex‑series model (unless you override it). That makes the model stream events whose type is reasoning.
  2. Azure’s Responses endpoint requires you to send that trace back on the next request, either as previous_response_id or by echoing reasoning.encrypted_content.
  3. Codex‑RS doesn’t yet forward either field, so Azure rejects the request with the 400 above. (Is this true?)

---

model_reasoning_effort            = "none"

This tells Codex not to request the extra channel, so no dangling rs_… ID is produced and Azure is satisfied. You lose only the verbose chain‑of‑thought payload—not the model’s actual reasoning ability.

---

References

  1. Encrypted Reasoning Items, Azure OpenAI Responses API (Preview) — Microsoft Learn  https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/responses#encrypted-reasoning-items
  2. Reasoning models guide, Azure OpenAI — Microsoft Learn  https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/reasoning#reasoning-effort
etraut-openai contributor · 10 months ago

@kingdomseed, thanks for filing the bug report. Apologies for the slow reply — we got far behind on our issues.

Are you still seeing this problem? I'm guessing that it's no longer relevant, since much has changed in the CLI since you originally filed it.

etraut-openai contributor · 10 months ago

I'm going to mark the issue as closed. If you are still seeing the problem, let us know, and I'll reopen.

OperationalFallacy · 10 months ago

{"latest_version":"0.52.0","last_checked_at":"2025-10-30T20:39:31.893083Z","dismissed_version":null}

Seeing constant interruptions, it starts doing something but next input breaks it with

■ unexpected status 400 Bad Request: {
  "error": {
    "message": "Item 'fc_xxx' of type 'function_call' was provided without its required
'reasoning' item: 'rs_xxx'.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
  }
}

Config

[model_providers.azure]
api_version = "2025-04-01-preview"
base_url = "https://codex-resource.openai.azure.com/openai/v1"
deployment = "gpt-5-codex"
env_key = "AZURE_OPENAI_API_KEY"
model = "gpt-5-codex"
model_reasoning_effort = "none"
name = "Azure OpenAI"
wire_api = "responses"
etraut-openai contributor · 10 months ago

@OperationalFallacy, thanks for reporting. Others are reporting the same problem with 0.52.0 in this bug report. Let's use that one to track the issue.