Skip to content

[Bug]: Telegram direct replay can send overlong Copilot reasoning item IDs #85197

Description

@galiniliev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Telegram direct-session replies can fail before assistant output when GitHub Copilot native Responses replays a persisted reasoning item id longer than the provider's 64-character input[].id limit.

Steps to reproduce

  1. Use a Telegram direct session routed to GitHub Copilot native Responses with gpt-5.5.
  2. Resume a session whose persisted assistant history contains a JSON thinkingSignature reasoning item with an overlong id.
  3. Send another Telegram direct message so OpenClaw rebuilds the Responses input[] payload from session history.
  4. Observe the provider reject the request before assistant output streams.

Expected behavior

OpenClaw should preserve valid short Responses replay item IDs, but normalize oversized replay item IDs before dispatch so resumed Telegram sessions can continue.

Actual behavior

The Telegram message is accepted and dispatched, but the agent run fails before assistant output. The gateway then records the inbound message as completed even though no assistant reply is produced.

OpenClaw version

NOT_ENOUGH_INFO

Operating system

NOT_ENOUGH_INFO

Install method

NOT_ENOUGH_INFO

Model

github-copilot/gpt-5.5

Provider / routing chain

OpenClaw -> GitHub Copilot native Responses

Additional provider/model setup details

The affected run used the OpenAI Responses request path for GitHub Copilot. The failure was observed on a Telegram direct session with existing persisted assistant reasoning replay history.

Logs, screenshots, and evidence

2026-05-22 gateway log excerpt, redacted:
telegram inbound: direct message accepted and buffered
embedded run start: provider=github-copilot model=gpt-5.5 thinking=medium messageChannel=telegram
embedded run prompt start: provider=github-copilot api=openai-responses endpoint=github-copilot-native route=native
context-overflow-precheck: route=fits estimatedPromptTokens=56663 overflowTokens=0
embedded_run_agent_end: isError=true error="OpenAI API error (400): 400 Invalid 'input[112].id': string too long. Expected a string with maximum length 64, but got a string with length 383 instead." model=gpt-5.5 provider=github-copilot rawErrorHash=sha256:2279064209cc
message dispatch completed: channel=telegram outcome=completed
message processed: channel=telegram outcome=completed

The same rejection hash appeared at least seven times in the same gateway log on 2026-05-22.

Impact and severity

Affected: Telegram direct sessions routed to GitHub Copilot native Responses with persisted overlong reasoning replay item IDs.
Severity: High, because the model request is rejected before assistant output and the Telegram UX receives no useful assistant reply.
Frequency: At least seven observed failures with the same provider rejection hash on 2026-05-22.
Consequence: Inbound Telegram messages are accepted and processed, but resumed agent turns fail before producing an assistant response.

Additional information

This is related to prior Copilot replay hardening for tool/function replay IDs, but the observed failure is specifically a persisted Responses reasoning item id parsed from thinkingSignature. The OpenAI SDK types do not encode the 64-character item ID limit; the limit is from the live provider rejection shown above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, 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.maintainerMaintainer-authored PR

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions