Item of type reasoning was provided without its required following item

Resolved 💬 8 comments Opened Jun 6, 2025 by JLO64 Closed Oct 16, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.0.2505291458

Which model were you using?

o4-mini

What platform is your computer?

Darwin 24.5.0 arm64 arm

What steps can reproduce the bug?

Within my Jekyll site repository I prompted variations of Explain how the grey image effect on desktop for the "Currently Reading" section on the homepage works and consistently ran into this bug. No other prompts I attempted caused this issue.

What is the expected behavior?

The expected behavior is that this reasoning model does not generate the below errors and stop generating responses.

What do you see instead?

First it errors out with the following:

│event                                                                                                                                                     █│
│BackgroundEvent(BackgroundEventEvent { message: "stream error: unexpected status 400 Bad Request: {\n  \"error\": {\n    \"message\": \"Item              █│
│'rs_6842594c48a4819a88b69872a29d35400b40ab3b5bf81a51' of type 'reasoning' was provided without its required following item.\",\n    \"type\":             █│
│\"invalid_request_error\",\n    \"param\": \"input\",\n    \"code\": null\n  }\n}; retrying 1/10 in 191ms…" })  

After unsuccessfully retrying a total of 10 attempts it displays the following and stops generating responses:

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

Additional information

I am running the rust branch.

View original on GitHub ↗

8 Comments

Damecek · 1 year ago

Same here.

^[[2m2025-06-06T13:21:39.701174Z^[[0m ^[[32m INFO^[[0m Configuring session: model=o4-mini; provider=ModelProviderInfo { name: "OpenAI", base_url: "https://api.openai.com/v1", env_key: Some("OPENAI_API_KEY"), env_key_instructions: Some("Create an API key (https://platform.openai.com) and export it as an environment variable."), wire_api: Responses }
^[[2m2025-06-06T13:21:49.414198Z^[[0m ^[[32m INFO^[[0m FunctionCall: {"command": ["bash", "-lc", "rg --files -g '*.html' -g '*.txt'"]}
...
^[[2m2025-06-06T13:23:39.879835Z^[[0m ^[[33m WARN^[[0m stream disconnected - retrying turn (10/10 in 1.962s)...
^[[2m2025-06-06T13:23:42.334993Z^[[0m ^[[32m INFO^[[0m Turn error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Item 'rs_6842ebce85a48192bcf4dba227ba9ceb0cce0c4be3d7d4c8' of type 'reasoning' was provided without its required following item.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
  }
}

config.toml

profile                  = "o4-mini"
model                    = "o4-mini"
model_provider           = "openai"
approval_policy          = "never"
model_reasoning_effort   = "medium"
disable_response_storage = false
hide_agent_reasoning = true


[profiles.o4-mini]  
model                  = "o4-mini"
model_provider         = "openai"
approval_policy        = "never"
model_reasoning_effort = "medium"
model_reasoning_summary = "none"

[model_providers.openai]
name      = "OpenAI"
base_url  = "https://api.openai.com/v1"
env_key   = "OPENAI_API_KEY"
wire_api  = "responses"

[model_providers.gemini]
name      = "Gemini"
base_url  = "https://generativelanguage.googleapis.com/v1beta/openai"
env_key   = "GEMINI_API_KEY"
wire_api  = "responses"
andregumieri · 1 year ago

Same for me and two others from my team:

OpenAI rejected the request (request ID:
    req_b3451f2115373a53a10ffbee9728b0bc). Error details: Status: 400, Code:
    unknown, Type: invalid_request_error, Message: 400 Item
    'rs_684304560db0819a83b2a5c31d1467810b9222214e75283c' of type 'reasoning'
    was provided without its required following item.. Please verify your
    settings and try again.

Version 0.1.2505172129
o4-mini

SagarKapoorin · 1 year ago

also facing same issue with Version 0.1.2505172129, o4-mini and full-auto mode. Any temporary fix ?

WASasquatch · 1 year ago

Hopefully this gets fixed and they aren't forcing us to use these "codex" fine-tunes. It's watermarking files, and adding stuff like "Powered by OpenAI Codex" to HTML, which is not only a false claim in general, but weird flex on OpenAI.

kingdomseed · 1 year ago

I still occassionally have this issue when running on the latest 0.2.0 Rust version of the TUI. It happens with codex-mini and with o3/o3-pro through Azure is my provider.

tibo-openai collaborator · 9 months ago

Should be fixed, marking as closed

Falven · 5 months ago

This issue still happens all the time.

<img width="2444" height="1376" alt="Image" src="https://github.com/user-attachments/assets/b20dec01-179b-43b4-bbd5-4b8f7d997919" />

etraut-openai contributor · 5 months ago

@Falven, this issue is closed. If you'd like to report a new issue, please use the /feedback slash command to create a new bug report.