Files
codex/codex-rs/context-fragments
pakrym-oai 0df76892b1 Support ordered response items in world-state context updates (#50441)
## 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
2026-10-02 22:12:07 +00:00
..