mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Complete assistant messages with empty text can produce misleading omitted-context notices in Guardian reviews. ## What changed - Skip complete, empty assistant messages when recording and rendering retained context, while preserving omission notices for incomplete messages. - Separate retained instruction fragments with blank lines and keep blank lines free of role prefixes, while labeling every nonempty line with its original role. - Update source-order guidance detection and empty-section deduplication for the added spacing. ## Testing Extend retained-context tests to cover empty completed messages across resume, restored empty messages, incomplete-message notices, blank-line spacing, and role labeling. Update Guardian prompt snapshots. GitOrigin-RevId: e945717b18689fa4538d9b617b89a644858ab1c8