mirror of
https://github.com/openai/codex.git
synced 2026-09-10 20:26:47 +00:00
## Why A fork cutoff can exclude the `TurnContext` that records the source's multi-agent runtime version. Recovering that version should not require loading the source's full model context. ## What changed - Preserve `multi_agent_version` in fork session metadata before applying the cutoff. If absent, scan backward for the newest version-bearing `TurnContext`, respecting inherited segment boundaries and stopping once resolved. - Load the latest model context for paginated forks only when approval or permission settings need to be restored. ## Testing Add regression tests covering stored-version precedence, early termination without reading older segments, and version recovery within inherited segment cutoffs. GitOrigin-RevId: 00e66bcce6f4092805e273cde99bd50f304fb39e