Skip to content

[Bug]: GPT-5.2 reasoning items in session history cause recurring 400 'required following item' errors #18282

Description

@gasu04

Description

When using openai/gpt-5.2-chat-latest as the primary model, after a few turns of conversation, both WhatsApp and Telegram channels return:

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

The error recurs every time the session accumulates reasoning items from GPT-5.2's responses. Clearing the session temporarily fixes it, but after a few more messages the error comes back.

Steps to Reproduce

  1. Configure agents.defaults.model.primary to openai/gpt-5.2-chat-latest
  2. Send a few messages via WhatsApp or Telegram
  3. After 2-5 turns, all responses fail with the 400 error above

Expected Behavior

Reasoning items from previous turns should either be:

  • Stripped from session history before replaying to the OpenAI Responses API, OR
  • Sent with their required following items intact

Actual Behavior

Stale type: "reasoning" items accumulate in the session transcript (.jsonl). On subsequent API calls, these are replayed without their required companion items, causing OpenAI to reject the request with a 400 error.

Logs

[agent/embedded] unsupported thinking level for openai/gpt-5.2-chat-latest; retrying with medium
[agent/embedded] embedded run agent end: isError=true
[web-auto-reply] [openclaw] 400 Item 'rs_...' of type 'reasoning' was provided without its required following item.

Environment

  • OpenClaw version: 2026.2.15
  • Model: openai/gpt-5.2-chat-latest
  • Channels affected: WhatsApp, Telegram
  • OS: macOS (Apple Silicon)
  • Node: v25.5.0

Workaround

Manually clearing/backing up the active session file in ~/.openclaw/agents/main/sessions/ restores functionality until reasoning items accumulate again.

Related

This is a known issue with OpenAI's Responses API across multiple frameworks:

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions