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
- 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"}]
}
- Set this as the default model for the main agent
- Start a conversation via Feishu/webchat — first few messages work fine
- After some time (or after session compaction/reload), send another message
- 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.
Bug Description
When using a provider configured with
api: openai-responses(e.g. a GPT-5.5 proxy), the gateway sendsstore=false(or omitsstore, which defaults to false) in responses API requests. However, on subsequent turns within the same session, the gateway includesprevious_response_idreferencing the previous response. Since that response was never persisted server-side, the API returns a 404:Once this happens, every subsequent request in the session fails with the same 404, because the stale
previous_response_idis never cleared. The session is permanently broken until the user runs/new.Steps to Reproduce
api: openai-responsespointing to an OpenAI-compatible endpoint (e.g. GPT-5.5 via a proxy):FailoverError: HTTP 404: Item with id "rs_xxx" not foundEnvironment
openai-responsesExpected Behavior
The gateway should either:
store: truein responses API requests so previous responses are available for follow-up turns, ORprevious_response_idfrom requests when the referenced response was not stored, ORprevious_response_id, automatically clear the stale reference and retry without itActual Behavior
The stale
previous_response_idis never cleared. The error propagates to the user as⚠️ Something went wrong while processing your request.The only recovery is/newto start a fresh session.Additional Context
This affects any provider using
api: openai-responseswith a backend that defaultsstore=false. The OpenAI Responses API documentation states thatstore=falsemeans 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.