-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Azure Responses session replay keeps msg id without required reasoning after fallback #88019
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Provider/session replay bug
Summary
A persistent dashboard agent session can get stuck when
azure-openai-responses/gpt-5.5fails once and the session falls back to a non-Responses Azure model. After switching back toazure-openai-responses/gpt-5.5, OpenClaw replays a previousmsg_*Responses message item without the pairedreasoningitem, so Azure rejects the next turn before content is produced.This is related to #84484, but the trigger observed here is an Azure Responses session that temporarily fell back from
azure-openai-responses/gpt-5.5toazure-openai/gpt-5.4, then resumed GPT-5.5 in the same session.Environment
2026.5.27 (27ae826)azure-openai-responses/gpt-5.5azure-openai/gpt-5.4Observed behavior
The dashboard showed:
The underlying provider error was:
A fresh
azure-openai-responses/gpt-5.5agent turn worked, so this was not a general provider/auth/config failure. The failure was scoped to one existing dashboard session history.Local diagnosis
The affected session history contained successful earlier
azure-openai-responses/gpt-5.5assistant messages with reasoning replay metadata. Later, the session switched/fell back toazure-openai/gpt-5.4. When the session was switched back toazure-openai-responses/gpt-5.5, the next turn failed before producing content.The behavior looked like the replay builder treated the turn as a model/provider switch and did not include the original Responses reasoning item, but still preserved/replayed the associated Responses message id (
msg_*). Azure then correctly rejected the input because that message id requires the pairedrs_*reasoning item.Adding a clean final model snapshot for
azure-openai-responses/gpt-5.5and removing the failed diagnostic turns allowed the same dashboard session to run on GPT-5.5 again. Switching the global default toazure-openai/gpt-5.4also avoided the immediate failure, but that is only a workaround and disables the desired GPT-5.5 path.Expected behavior
When resuming a Responses-family model after fallback/model switching, OpenClaw should build a provider-valid replay input. In particular, it should either:
reasoningitem whenever it preserves the pairedmsg_*item id;msg_*id and incompatible reasoning state together when replay compatibility fails; orA transient fallback from
azure-openai-responses/gpt-5.5toazure-openai/gpt-5.4should not poison the persistent session for future GPT-5.5 turns.Workaround used locally
azure-openai-responses/gpt-5.5.model-snapshotforazure-openai-responses/gpt-5.5.After that, a fresh GPT-5.5 agent turn and the repaired dashboard session worked again.