mirror of
https://github.com/openai/codex.git
synced 2026-10-24 23:54:33 +00:00
## Why A fork cutoff can remove the only `TurnContext` recording the source thread's selected multi-agent version. Forking before the first turn must preserve that version, including when the child is resumed before its first turn. ## What changed Recover the version from the untrimmed source history or loaded parent, independently of permission overrides, and carry it into the fork's session metadata for `last_turn_id` and `before_turn_id` cutoffs. ## Testing Add regression coverage for forks before the first turn across legacy and paginated history modes, with loaded and unloaded parents and explicit permission overrides. Verify that the child persists `MultiAgentVersion::V2` and still uses the `collaboration` tools after restarting and resuming. GitOrigin-RevId: d7e30cf8bfdeb4f755fefab3d1d0884964d7c977