mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
## Why Resuming a running thread with a summary initial page cloned every active-turn item before discarding those outside the summary, including potentially large reasoning payloads. ## What changed - Snapshot the active turn using the requested `TurnItemsView`, copying only the first user message and final agent message for summaries and no items for `NotLoaded`. - Preserve full snapshots when the resume response includes full turns, even if its initial page requests a summary. - Share item selection between snapshots and page responses, and skip selection when a turn already has the requested view. ## Testing Add unit coverage for summary selection, completed-turn metadata, and metadata-only snapshots. Extend running-thread resume coverage for default summaries, explicit full pages, and full turns returned alongside a summary page. GitOrigin-RevId: 6ddcd93c44dbc8083827ac82f442b31730a4edde