Skip to content

Capture Guardian review checkpoints from live context - #46512

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/cb2638ca93bba6ab4472de50c7e2913e1a2f25a8
Sep 18, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/cb2638ca93bba6ab4472de50c7e2913e1a2f25a8

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Capture Guardian review checkpoints from live context

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.

## 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
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/cb2638ca93bba6ab4472de50c7e2913e1a2f25a8 branch from 840ae5a to 0f7c860 Compare September 18, 2026 23:37
@copyberry
copyberry Bot merged commit 0f7c860 into main Sep 18, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/cb2638ca93bba6ab4472de50c7e2913e1a2f25a8 branch September 18, 2026 23:37
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant