mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Preserve fork runtime versions without loading full model context (#43545)
## 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
This commit is contained in:
@@ -4944,6 +4944,7 @@ impl ThreadRequestProcessor {
|
||||
None
|
||||
};
|
||||
let latest_context = if paginated_source
|
||||
&& needs_latest_settings
|
||||
&& loaded_parent.is_none()
|
||||
&& (last_turn_id.is_some() || before_turn_id.is_some())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user