mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-18 00:23:25 -06:00
b8c7f31894
* fix(sessions): prevent delivery-mirror prompt contamination with adjacent dedup and identity fallback (#99470) Two-layer defence against delivery-mirror entries leaking into provider prompts after session rebuild / side-branch merge strips metadata: Layer 1 (identity fallback): isTranscriptOnlyOpenClawAssistantMessage gains an openclawDeliveryMirror field check to catch stripped-metadata survivors that lost provider/model during rebuild. Layer 2 (adjacent dedup): normalizeAssistantReplayContent collapses adjacent byte-identical no-tool-call assistant messages, catching fully-bare {role,content,usage} survivors invisible to any metadata filter. P1 fix: added 'tool_use' (native Anthropic snake_case) to TOOL_CALL_TYPES in extractToolCallsFromAssistant so adjacent dedup never collapses tool-call-bearing turns. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(sessions): narrow delivery mirror replay filtering * test(sessions): preserve tool-call replay duplicates --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>