openclaw - 💡(How to fix) Fix GPT-5.5 reasoning item schema error causes duplicate Discord messages via retry cascade

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…

When GPT-5.5 is the default model and a user sends a message on a Discord channel, OpenClaw often sends multiple near-identical responses (3-5 duplicates) to that channel. The root cause is a retry cascade triggered by an OpenAI API schema error, combined with the retry path not deduplicating by inbound Discord message_id.

Error Message

lane task error: lane=session:agent:main:discord:channel:1499540372618084512 durationMs=29918 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"

Root Cause

When GPT-5.5 is the default model and a user sends a message on a Discord channel, OpenClaw often sends multiple near-identical responses (3-5 duplicates) to that channel. The root cause is a retry cascade triggered by an OpenAI API schema error, combined with the retry path not deduplicating by inbound Discord message_id.

Fix Action

Workaround

Changed default model to anthropic/claude-sonnet-4-6. GPT-5.5 moved to fallback list. No duplicate messages since the switch.

Code Example

400 Item 'msg_...' of type 'message' was provided without its required 'reasoning' item: 'rs_...'

---

lane task error: lane=session:agent:main:discord:channel:1499540372618084512 durationMs=29918
error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"

---

{
  "event": "embedded_run_failover_decision",
  "provider": "openai",
  "model": "gpt-5.5",
  "rawErrorPreview": "400 Item 'msg_04aba82edd478513006a0c2071cc24819bb493a308058de9d6' of type 'message' was provided without its required 'reasoning' item: 'rs_04aba82edd478513006a0c206cb3b4819baea439c0527527c0'.",
  "providerRuntimeFailureKind": "schema"
}
RAW_BUFFERClick to expand / collapse

GPT-5.5 reasoning item schema error causes duplicate Discord messages via retry cascade

OpenClaw version

2026.5.18 (50a2481)

Environment

  • OS: Ubuntu 22.04 (Azure VM)
  • Node: v22.22.1
  • Channel: Discord
  • Default model: openai/gpt-5.5 (with fallback chain)

Description

When GPT-5.5 is the default model and a user sends a message on a Discord channel, OpenClaw often sends multiple near-identical responses (3-5 duplicates) to that channel. The root cause is a retry cascade triggered by an OpenAI API schema error, combined with the retry path not deduplicating by inbound Discord message_id.

Error chain

  1. User sends a Discord message
  2. OpenClaw processes it with GPT-5.5 → succeeds → sends response to Discord ✅
  3. On retry/reprocessing, the OpenAI API rejects the request with:
    400 Item 'msg_...' of type 'message' was provided without its required 'reasoning' item: 'rs_...'
    GPT-5.5 produces reasoning tokens, but they aren't properly preserved in session history for replay.
  4. This triggers EmbeddedAttemptSessionTakeoverError (multiple retries racing on the same session file)
  5. Some retries succeed → duplicate Discord messages sent
  6. Failed retries cascade through the fallback chain, which also fails:
    • o3: "Your organization must be verified to generate reasoning summaries"
    • o3-deep-research: "Deep research models require at least one of 'web_search_preview', 'mcp', or 'file_search' tools"
    • gpt-5.3-chat-latest: "Unsupported value: 'low' is not supported... Supported values are: 'medium'"

Impact on a single day (May 20, 2026)

  • 92 EmbeddedAttemptSessionTakeoverErrors
  • 81 FailoverErrors
  • 80 session takeover errors on one channel alone (#byok-relay-project)
  • User received 3-5 near-identical replies to each message

Log evidence

lane task error: lane=session:agent:main:discord:channel:1499540372618084512 durationMs=29918
error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
{
  "event": "embedded_run_failover_decision",
  "provider": "openai",
  "model": "gpt-5.5",
  "rawErrorPreview": "400 Item 'msg_04aba82edd478513006a0c2071cc24819bb493a308058de9d6' of type 'message' was provided without its required 'reasoning' item: 'rs_04aba82edd478513006a0c206cb3b4819baea439c0527527c0'.",
  "providerRuntimeFailureKind": "schema"
}

Expected behavior

  1. Reasoning items should be preserved in session history so replaying conversations with GPT-5.5 doesn't trigger schema errors
  2. Retries should deduplicate by inbound message_id — if a Discord message has already been successfully responded to, retries should not produce additional responses
  3. Fallback chain should not attempt models that require org verification or specific tools that aren't configured

Workaround

Changed default model to anthropic/claude-sonnet-4-6. GPT-5.5 moved to fallback list. No duplicate messages since the switch.

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…

FAQ

Expected behavior

  1. Reasoning items should be preserved in session history so replaying conversations with GPT-5.5 doesn't trigger schema errors
  2. Retries should deduplicate by inbound message_id — if a Discord message has already been successfully responded to, retries should not produce additional responses
  3. Fallback chain should not attempt models that require org verification or specific tools that aren't configured

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 GPT-5.5 reasoning item schema error causes duplicate Discord messages via retry cascade