{"version":"2.1.20","anchor":"message-structure-repair","canonical_anchor":"message-structure-repair","heading":"Message Structure Repair","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.20\/e\/message-structure-repair","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.20","markdown":"### Message Structure Repair\n\n**What**\n\nAutomatic repair of malformed tool result pairings in conversation history.\n\n**Details**\n\n- Detects and repairs missing `tool_result` blocks\n- Logs: `ensureToolResultPairing: repaired missing tool_result blocks (X -> Y messages)`\n- Prevents conversation corruption from improperly paired tool uses\n\n**Evidence**\n\nRepair logging at line 469512"}