Repository navigation
fix(agents): prevent transcript redaction from corrupting signed reasoning - #103628
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 2:35 PM ET / 18:35 UTC. Summary PR surface: Source +69, Tests +163. Total +232 across 2 files. Reproducibility: yes. Current-main source provides a deterministic persistence-time corruption path, and the PR supplies exact-head live assertions for valid replay, corrupted-signature rejection, recovery, and canary redaction; this read-only review did not independently execute the provider calls. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Adopt the route-, field-, and grammar-aware preservation in transcript persistence, leave global secret detectors unchanged, retain the existing poisoned-history recovery path, and validate the refreshed merge candidate. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source provides a deterministic persistence-time corruption path, and the PR supplies exact-head live assertions for valid replay, corrupted-signature rejection, recovery, and canary redaction; this read-only review did not independently execute the provider calls. Is this the best way to solve the issue? Yes. A centralized route-, field-, and grammar-aware persistence exemption fixes the corruption without weakening global credential patterns and is narrower than adding downstream provider-specific workarounds. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b56bad33f2fb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +69, Tests +163. Total +232 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
Exact-head live behavior proofSource: Execution: direct AWS Crabbox, provider Bedrock signed-reasoning contract and recoveryRun: {"status":"BEDROCK_REPLAY_VARIANT_REJECTED_AS_EXPECTED","variant":"missing-signature","errorName":"ValidationException","signatureRelated":true}
{"status":"BEDROCK_REPLAY_VARIANT_REJECTED_AS_EXPECTED","variant":"ellipsis-corrupted-signature","errorName":"ValidationException","signatureRelated":true}
{"status":"BEDROCK_PROVIDER_CONTRACT_PASSED","model":"global.anthropic.claude-sonnet-4-6","signatureLength":368,"signatureHashPrefix":"25695ba79926c477","exactReplaySucceeded":true,"missingSignatureRejected":true,"corruptedSignatureRejected":true}
{"status":"PERSISTED_SIGNATURE_POISONED_FOR_LIVE_RECOVERY"}
{"status":"OPENCLAW_POISONED_SESSION_RECOVERY_PASSED","sha":"f983edbbf39b4dde4d23fbf9aa746a3c0597c9fc","activePoisonedSignatureCount":0,"activeThinkingBlocks":1,"recoveryLogged":true}The run completed with exit code 0, untruncated output, and empty captured stderr. Redacted log SHA256: Credential-canary security boundaryRun: {"status":"LIVE_SECURITY_BOUNDARY_PASSED","sha":"f983edbbf39b4dde4d23fbf9aa746a3c0597c9fc","rawCanaryAbsent":true,"redactionMarkerPresent":true,"signatureCount":1,"signaturesPreserved":true,"replaySucceeded":true}The run completed with exit code 0, untruncated output, and empty captured stderr. Redacted log SHA256: Publication boundaryThese are the complete assertion outputs. Provider credentials, the synthetic canary value, prompts, raw provider responses, private endpoints, IP addresses, lease-owner metadata, and agent response bodies were not published. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Closes #102244
AI-assisted: Yes (Codex). I reviewed and understand the implementation.
What Problem This Solves
Transcript redaction could mistake credential-shaped substrings inside provider-minted reasoning signatures for secrets. Rewriting those signed bytes made persisted Anthropic and Bedrock sessions fail replay with invalid-signature errors.
Why This Change Was Made
This change preserves only structurally valid opaque replay payloads in route-specific provider signature fields. OpenAI structured replay envelopes are normalized to the minimal replay metadata while their encrypted payload remains exact.
Ordinary text, malformed payloads, unknown routes, and credential-shaped values outside recognized signed fields continue through normal redaction. Existing poisoned histories continue to use the existing replay recovery path.
This does not change signature capture behavior. In particular, OpenRouter streams that use a reasoning-detail ID distinct from the tool-call ID remain a separate adapter concern.
User Impact
Users can continue Bedrock/Anthropic, Gemini, OpenAI Responses, and compatible tool-reasoning sessions across persistence, restart, and compaction without transcript redaction corrupting valid replay signatures.
Evidence
run_6b68bef9025b).run_a3439a8dee0b).npm-pack:Bedrock install preserved and replayed a 2,556-character signature (run_1130e4b0c914).run_5754946d4f04).run_ae547a8a6dd1).run_795c6e6608f7).run_201fe0daff8d).run_8a1125fe54eb,run_7ab63f698054).