mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
## Why World-state sections could return only a single optional text fragment, with message separation controlled by the fragment itself. They could not contribute explicit `ResponseItem` values alongside instructions. ## What changed - Let sections return ordered `WorldStateUpdate` values containing fragments or response items, with `Prefix`, `Standalone`, or `Mergeable` placement. - Preserve explicit item boundaries when grouping context updates, and place prefix updates first when assembling initial context. - Move standalone-message decisions from fragments to world-state updates and retain snapshot handling. ## Testing Add tests for mixed fragment/item ordering, role and standalone boundaries, initial-context prefix placement, and snapshot restoration without repeated updates. GitOrigin-RevId: c2514c3c98538da83f5140c10a9d89f531de6549