Fix native Codex encrypted replay recovery#85294
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: the core native Codex encrypted replay recovery is already superseded by the merged provenance-bound replay fix on current main and shipped in v2026.5.20; this branch’s remaining changes would replace that safer contract with broader reasoning suppression and session-reset behavior. Canonical path: Keep the shipped provenance-bound replay and encrypted-content retry implementation from the merged fix, and pursue any session-reset fallback only as a separate narrow follow-up that preserves that contract. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Keep the shipped provenance-bound replay and encrypted-content retry implementation from the merged fix, and pursue any session-reset fallback only as a separate narrow follow-up that preserves that contract. Do we have a high-confidence way to reproduce the issue? Yes for the historical failure: the superseding merged PR includes before/after live Codex proof of invalid encrypted replay and recovery. I do not have a current-main failure path because the provenance-bound fix is now present and released. Is this the best way to solve the issue? No: this branch is not the best fix because it disables all native Codex reasoning replay instead of preserving safe replay and stripping/retrying only unsafe encrypted content. The shipped provenance-bound transport fix is narrower and already has stronger live proof. Security review: Security review cleared: The diff does not add dependencies, workflows, package metadata, downloaded code, permissions, or new credential-handling paths. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 84329182a7c4; fix evidence: release v2026.5.20, commit a54c73687f58. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper applied the proposed close for this PR.
|
Summary
openai-codexResponses requests from replaying prior reasoning items while preserving reasoning replay for non-native Responses backendsinvalid_encrypted_content/ encrypted-content parse failures as replay-invalid session stateReal behavior proof
Behavior addressed: Native Codex Responses follow-up turns can fail with
invalid_encrypted_contentwhen encrypted reasoning content from a prior response is replayed.Real environment tested: Local OpenClaw source checkout on macOS against current
origin/mainafterpnpm installrefreshed workspace dependencies, using the real OpenClaw Responses payload builder with a redacted native Codex model/session shape and a prior assistant turn containing reasoning metadata.Exact steps or command run after this patch:
Evidence after fix: Terminal capture from the local OpenClaw runtime payload-builder command:
{ "nativeCodexReplayIncludesReasoning": false, "nativeCodexInputTypes": [ null, "message", "message", null ], "standardResponsesReplayIncludesReasoning": true }Observed result after fix: Native
openai-codexResponses payload construction no longer includes a replayedreasoningitem for the redacted follow-up transcript, while standard OpenAI Responses still replays reasoning.git diff --checkpassed; the targeted regression command passed with 3 test files and 260 tests; the focused e2e replay-invalid session rotation test passed with 1 test and 50 skipped tests;pnpm check:test-typespassed.What was not tested: I have not attached a live Telegram/ChatGPT backend transcript from an actual networked native Codex follow-up after this branch. I also previously attempted the full
agent-runner.runreplyagent.e2e.test.tsfile; it did not complete green because two existing overflow fallback assertions expectconversation is too largewhile current output saysAuto-compaction could not recover this turn. This PR does not touch those overflow assertions or fallback text.