mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Thread stores need a way to reuse history and writer state loaded while preparing a resume, rather than loading them again during session startup. ## What changed - Add an opaque, single-use `ThreadStoreResumePreparation` and an optional preparation in `StartThreadOptions`. - Pass preparation through session startup to `ThreadStore::resume_thread_with_preparation`, which defaults to an unsupported-operation error. - Reject preparation for ephemeral threads or threads without resumed history. Continue using `resume_thread` when no preparation is supplied. ## Testing Add a regression test verifying that supplied preparation selects the prepared store path and propagates its unsupported-operation error instead of falling back to ordinary resume. GitOrigin-RevId: 26537d9b83443bd56341d6afc713f32b999dc67c