invalid_request_error: reasoning item provided without required following item (Codex CLI 0.92)

Resolved 💬 5 comments Opened Jan 29, 2026 by ibabencu Closed Mar 5, 2026
💡 Likely answer: A maintainer (sayan-oai, contributor) responded on this thread — see the highlighted reply below.

Summary

When using Codex CLI (v0.92) with GPT-5 Codex high reasoning, the API returns an invalid_request_error indicating a reasoning item was provided without a required following item.

Error

{
  "error": {
    "message": "Item 'rs_02df0e1c14fc6c3000697b676491008195a9819c02bdf5feab' of type 'reasoning' was provided without its required following item.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
  }
}

Environment

  • Codex CLI: 0.92
  • Model: GPT-5 Codex (high reasoning)
  • OS: Windows
  • Date/Time: 2026-01-29 (time + timezone not captured)
  • Request ID: N/A

Steps to Reproduce

  1. Run Codex CLI with GPT-5 Codex high reasoning.
  2. Submit a prompt that triggers reasoning items in the request.
  3. API fails with the error above.

Expected

Request succeeds or error message explains the required following item format.

Actual

Request fails with invalid_request_error.

Additional Context

If you need the raw request payload, let me know what to capture from Codex CLI logs and I can provide it.

View original on GitHub ↗

5 Comments

sayan-oai contributor · 7 months ago

Hey @ibabencu, do you mind running /feedback and sharing the thread-id?

ibabencu · 7 months ago

i'll try finding the convo. i hope i can. yolo.
Edit: i'll ask codex to find it i have a SS

ibabencu · 7 months ago

Hi! Adding redacted technical details (no secrets):

Thread ID: 019c092e-93f4-7e83-8c0b-9c60dabe27a6
Date/Time (UTC): 2026-01-29 ~14:00Z (from local Codex logs)
Codex CLI version: 0.92.0
OS: Windows
Provider: Azure OpenAI via Codex CLI
Model (deployment name): gpt-5.2-codex
Reasoning effort: high (via CLI profile)

Error (verbatim):

{
  "error": {
    "message": "Item 'rs_02df0e1c14fc6c3000697b676491008195a9819c02bdf5feab' of type 'reasoning' was provided without its required following item.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
  }
}

Repro (minimal):
1) Run Codex CLI with profile high (reasoning effort = high).
2) Send any prompt (I saw it on a normal user prompt; not tool-specific).
3) Response fails immediately with the error above.

Redacted request outline (best-effort; NOT a raw wire dump):

POST Responses API (Azure OpenAI)
model: "gpt-5.2-codex"  // deployment name
reasoning: { effort: "high" }
input: [
  { "type": "input_text", "text": "<redacted user prompt>" }
]

Not available in CLI logs by default: request_id, response headers, and raw request/response JSON. If you want me to re-run with a specific debug/logging flag to capture a fully redacted raw dump, tell me which flags/fields you need and I’ll provide it.

Redactions: No API keys, tokens, full base URL, or user paths included.

ibabencu · 7 months ago

Additional detail: I ran Codex CLI with the YOLO option (flag: codex --dangerously-bypass-approvals-and-sandbox).

charley-oai contributor · 5 months ago

Similar to this https://github.com/openai/codex/issues/13480

Please report if you notice again