mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
## Why Matching messages by text can link a tool call to an earlier message with the same content. A recipient can also accept a message without ever including it in a model request. ## What changed Record the originating tool call ID when the recipient adds a spawn, task assignment, or message to its history. On replay, use that ID to link the accepted message to its sender even if the recipient records it before the sender tool finishes. Keep the interaction edge pointed at the recipient thread until the message appears in a model request. Track distinct conversation items across history resets and count repeated prompt prefixes only once. ## Testing Replay tests cover identical message text, receipt before tool completion, and messages observed again after compaction. GitOrigin-RevId: ccab7c33993ba5fce7fceb733dc90c9d428ec78f