-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Codex replay can silently fail Telegram turns with invalid_encrypted_content from mirrored thinking blocks #83836
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:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper 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 does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.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.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper 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 does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.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
Give feedbackNo fields configured for issues without a type.
Summary
A channel-bound conversation stopped receiving replies even though the gateway and channel provider were healthy. Inbound messages were accepted, but the embedded Codex run failed before producing a deliverable reply because stale mirrored
thinkingblocks withthinkingSignature/encrypted_contentwere replayed back to the Responses API.This made the user-facing symptom look like OpenClaw simply ignored the message.
Environment
2026.5.18(50a2481)@openclaw/codex:2026.5.12openai-codex/gpt-5.5Evidence Pattern
Operational identifiers, channel ids, session ids, host names, and deployment paths are intentionally redacted.
Two messages entered the gateway for the same bound conversation. Both embedded runs failed before a reply:
The corresponding trajectory recorded:
The session transcript contained historical assistant content blocks like:
{ "type": "thinking", "thinkingSignature": "{...\"encrypted_content\":\"<redacted>\"...}" }Those blocks were being included in mirrored replay context for later turns. After removing these
thinkingblocks from the local transcript and clearing the associated Codex app-server binding, the same conversation was able to run again and return a normal response.Expected Behavior
OpenClaw/Codex replay should not send stale provider-encrypted reasoning payloads back to the model when they cannot be verified for the current request/thread/auth context.
At minimum:
thinking/redacted_thinking/thinkingSignatureblocks from mirrored session history before sending replay messages to Responses.invalid_encrypted_contentas a recoverable replay-sanitization failure: retry once with reasoning blocks removed.Actual Behavior
400 invalid_encrypted_content.non_deliverable_terminal_turnwith no assistant text.Local Operational Workaround Applied
On the affected deployment, the conversation was restored by:
thinkingblocks carrying encrypted reasoning signatures from the transcript.A local installed-runtime mitigation was also applied to strip replayed
thinkingblocks from mirrored history before building Codex request messages. This is only an operational patch and should be replaced by an upstream fix.Notes
This may also interact badly with channel UX because failure is invisible to the user. A non-sensitive channel-visible fallback/error would have made the incident much easier to diagnose.