openclaw - 💡(How to fix) Fix [Bug]: Copilot replay repair leaves invalid reasoning item IDs [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…

GitHub Copilot native Responses replay still sends invalid overlong reasoning.id values after tool-call ID repair, causing Copilot to reject the request body before generation.

Error Message

  • Provider raw error preview: 400 {"message":"","code":"invalid_request_body"}

Root Cause

GitHub Copilot native Responses replay still sends invalid overlong reasoning.id values after tool-call ID repair, causing Copilot to reject the request body before generation.

Fix Action

Fixed

Code Example

Observed on 2026-05-17 after the tool-call ID repair landed:
- At least three failures on the same affected agent workflow: two web-chat attempts around 15:35-15:36 UTC and one scheduled-job attempt around 17:44 UTC.
- OpenClaw repaired one assistant message before each failing request.
- The request used provider=github-copilot, model=gpt-5.5, api=openai-responses, endpoint=github-copilot-native.
- Failure: LLM request failed: provider rejected the request schema or tool payload.
- Provider raw error preview: 400 {"message":"","code":"invalid_request_body"}
- Provider runtime failure kind: schema.
- The scheduled-job lane backed off after repeated consecutive failures.

Sanitized structural probe of the affected session, without prompt/chat content:
- Source session: assistantToolCalls=114, toolResults=114, over64ToolCallIds=114, over64ToolResultIds=114, duplicateToolCallIds=0, orphanToolResults=0.
- Outbound payload after current code: inputItems=317, functionCalls=114, functionOutputs=114, callIdsOver64=0, orphanOutputs=0, duplicateIds=0, idsOver64=53, maxIdLen=408.
- Offending outbound item type: reasoning. reasoning count=53, idsOver64=53, maxIdLen=408.
- Function-call replay IDs were already repaired: function_call idsOver64=0, function_call maxIdLen=19, maxCallIdLen=29, function_call_output maxCallIdLen=29.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

GitHub Copilot native Responses replay still sends invalid overlong reasoning.id values after tool-call ID repair, causing Copilot to reject the request body before generation.

Steps to reproduce

  1. Resume an existing same-model github-copilot/gpt-5.5 agent session that contains persisted Responses reasoning items with provider-generated IDs longer than 64 characters and persisted tool calls whose IDs have already been repaired/normalized.
  2. Build the next native Responses request from that session history.
  3. Send the request through the GitHub Copilot native Responses route.

Expected behavior

The outbound Copilot Responses payload should contain only provider-valid replay-visible item IDs and call IDs, so the next request can reach model generation.

Actual behavior

Copilot rejects the request before generation with 400 {"message":"","code":"invalid_request_body"} and OpenClaw reports LLM request failed: provider rejected the request schema or tool payload.

OpenClaw version

Source checkout after 4537b89da6 (fix(agents): normalize Copilot replay tool IDs); packaged version NOT_ENOUGH_INFO

Operating system

NOT_ENOUGH_INFO

Install method

NOT_ENOUGH_INFO

Model

github-copilot/gpt-5.5

Provider / routing chain

OpenClaw agent runtime -> GitHub Copilot native Responses route

Additional provider/model setup details

The failing route was provider=github-copilot, api=openai-responses, endpoint=github-copilot-native, route=native, policy=none. Private agent/session identifiers and local paths are redacted.

Logs, screenshots, and evidence

Observed on 2026-05-17 after the tool-call ID repair landed:
- At least three failures on the same affected agent workflow: two web-chat attempts around 15:35-15:36 UTC and one scheduled-job attempt around 17:44 UTC.
- OpenClaw repaired one assistant message before each failing request.
- The request used provider=github-copilot, model=gpt-5.5, api=openai-responses, endpoint=github-copilot-native.
- Failure: LLM request failed: provider rejected the request schema or tool payload.
- Provider raw error preview: 400 {"message":"","code":"invalid_request_body"}
- Provider runtime failure kind: schema.
- The scheduled-job lane backed off after repeated consecutive failures.

Sanitized structural probe of the affected session, without prompt/chat content:
- Source session: assistantToolCalls=114, toolResults=114, over64ToolCallIds=114, over64ToolResultIds=114, duplicateToolCallIds=0, orphanToolResults=0.
- Outbound payload after current code: inputItems=317, functionCalls=114, functionOutputs=114, callIdsOver64=0, orphanOutputs=0, duplicateIds=0, idsOver64=53, maxIdLen=408.
- Offending outbound item type: reasoning. reasoning count=53, idsOver64=53, maxIdLen=408.
- Function-call replay IDs were already repaired: function_call idsOver64=0, function_call maxIdLen=19, maxCallIdLen=29, function_call_output maxCallIdLen=29.

Impact and severity

Affected: Copilot-backed agent sessions with persisted same-model Responses reasoning items whose IDs exceed Copilot's accepted request-body envelope. Severity: High; the request is rejected before generation, web chat/memory flush can fail, and scheduled jobs can back off. Frequency: At least three observed post-fix failures on 2026-05-17 in the affected workflow. Consequence: The agent cannot continue from the affected replay history until invalid reasoning IDs are removed from outbound payloads.

Additional information

Recent fixes normalized function_call.id and function_call_output.call_id, but convertResponsesMessages() still JSON-parsed persisted reasoning signatures and replayed the reasoning item unchanged. The remaining invalid provider-visible IDs were all on reasoning input items, not tool calls.

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

The outbound Copilot Responses payload should contain only provider-valid replay-visible item IDs and call IDs, so the next request can reach model generation.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING