openclaw - 💡(How to fix) Fix openai-responses provider: 404 on previous_response_id when store=false (default) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

The stale previous_response_id is never cleared. The error propagates to the user as ⚠️ Something went wrong while processing your request. The only recovery is /new to start a fresh session.

Root Cause

Once this happens, every subsequent request in the session fails with the same 404, because the stale previous_response_id is never cleared. The session is permanently broken until the user runs /new.

Fix Action

Fixed

Code Example

HTTP 404: Item with id "rs_xxxxx" 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.

---

"wlkgpt": {
     "baseUrl": "https://api.example.com/v1",
     "api": "openai-responses",
     "models": [{"id": "gpt-5.5"}]
   }
RAW_BUFFERClick to expand / collapse

Bug Description

When using a provider configured with api: openai-responses (e.g. a GPT-5.5 proxy), the gateway sends store=false (or omits store, which defaults to false) in responses API requests. However, on subsequent turns within the same session, the gateway includes previous_response_id referencing the previous response. Since that response was never persisted server-side, the API returns a 404:

HTTP 404: Item with id "rs_xxxxx" 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.

Once this happens, every subsequent request in the session fails with the same 404, because the stale previous_response_id is never cleared. The session is permanently broken until the user runs /new.

Steps to Reproduce

  1. Configure a provider with api: openai-responses pointing to an OpenAI-compatible endpoint (e.g. GPT-5.5 via a proxy):
    "wlkgpt": {
      "baseUrl": "https://api.example.com/v1",
      "api": "openai-responses",
      "models": [{"id": "gpt-5.5"}]
    }
  2. Set this as the default model for the main agent
  3. Start a conversation via Feishu/webchat — first few messages work fine
  4. After some time (or after session compaction/reload), send another message
  5. Observe: FailoverError: HTTP 404: Item with id "rs_xxx" not found

Environment

  • OpenClaw CLI/Gateway: 2026.5.27
  • OS: Windows 11
  • Provider: third-party OpenAI-compatible proxy serving GPT-5.5
  • API type: openai-responses
  • Fallback chain: configured but does NOT trigger (session-level model selection bypasses global fallbacks, separate issue)

Expected Behavior

The gateway should either:

  • (A) Send store: true in responses API requests so previous responses are available for follow-up turns, OR
  • (B) Strip previous_response_id from requests when the referenced response was not stored, OR
  • (C) On receiving a 404 for a previous_response_id, automatically clear the stale reference and retry without it

Actual Behavior

The stale previous_response_id is never cleared. The error propagates to the user as ⚠️ Something went wrong while processing your request. The only recovery is /new to start a fresh session.

Additional Context

This affects any provider using api: openai-responses with a backend that defaults store=false. The OpenAI Responses API documentation states that store=false means responses are not persisted, so referencing them in subsequent requests is invalid.

Related: session-level model overrides also prevent fallback chains from activating when the primary model fails, compounding the issue — a single model failure breaks the entire session with no automatic recovery.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix openai-responses provider: 404 on previous_response_id when store=false (default) [1 pull requests]