mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
## Why Committing a Guardian review snapshot currently flushes and reloads the transcript from storage, even though the completed model context is already available in memory. ## What changed - Build forkable checkpoints directly from live session state, preserving model history, retained Guardian context, world state, turn context, and token usage. - Preserve compaction window metadata and MCP resource origins in the checkpoint. - Recognize prior user turns inside compacted replacement history. ## Testing Add round-trip checkpoint tests for legacy and thread-owned Guardian context without storage, including preservation after live history is mutated. Extend the review compaction test to assert that checkpoints do not load history from storage. GitOrigin-RevId: cb2638ca93bba6ab4472de50c7e2913e1a2f25a8