Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes entire resume for Codex sessions by restoring transcripts to Codex’s canonical rollout location (so codex resume <id> can rediscover them) and sanitizing restored transcripts to remove encrypted/log fragments that cannot be replayed off the source machine.
Changes:
- Add an agent capability (
RestoredSessionPathResolver) so restore logic can ask agents for the correct restored transcript path. - Update Codex agent path resolution to (a) locate nested rollouts and (b) compute the canonical restored rollout path from transcript start time; sanitize restored transcripts to strip encrypted/compaction artifacts.
- Add targeted tests for Codex resume command display, restored path resolution, and transcript sanitization.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/strategy/manual_commit_rewind.go | Uses the new agent capability to choose a transcript-specific restore path when rebuilding sessions from checkpoint data. |
| cmd/entire/cli/resume_test.go | Adds a regression test ensuring restored Codex sessions show a codex resume <id> continuation command. |
| cmd/entire/cli/agent/codex/transcript.go | Adds transcript sanitization for restored rollouts and registers Codex as supporting restored-path resolution. |
| cmd/entire/cli/agent/codex/transcript_test.go | Tests that sanitization removes encrypted content and compaction entries (including within compacted history). |
| cmd/entire/cli/agent/codex/codex.go | Implements canonical restored rollout path computation, nested rollout discovery, and writes sanitized restored transcripts. |
| cmd/entire/cli/agent/codex/codex_test.go | Adds tests for canonical restored rollout path computation and nested rollout discovery. |
| cmd/entire/cli/agent/agent.go | Introduces RestoredSessionPathResolver interface to support agent-specific restored transcript locations. |
f5759d8 to
5c3b886
Compare
Entire-Checkpoint: 8cdcce4b4b76
Entire-Checkpoint: 84f89ae1b99b
… restore anyhow Entire-Checkpoint: a77fe7632f93
Entire-Checkpoint: 0ea4805786bc
Entire-Checkpoint: 34470e766f9e
Entire-Checkpoint: 5a4998e91de2
Entire-Checkpoint: 072b7f08a759
Entire-Checkpoint: 39b82e835037
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
entire resumefor codex also needs to use the right path and also has a few constraints on encrypted parts in the logs that are not transferable since the decryption can only happen on the source machine.but with this
entire resumeworks now for codex sessionsNote
Medium Risk
Medium risk: changes how restored Codex transcripts are located/written (glob search + canonical nested paths) and mutates restored transcript contents, which could break resume if path parsing or sanitization is incorrect.
Overview
Fixes Codex session restoration so
entire resumewrites restored transcripts to a canonical, date-sharded~/.codex/sessions/YYYY/MM/DD/rollout-<timestamp>-<id>.jsonlpath derived from the transcript’ssession_metatimestamp, enablingcodex resume <id>to rediscover the rollout.Adds a new optional agent capability
RestoredSessionPathResolver, used during logs-only restore to override the defaultResolveSessionFiletarget path when an agent needs transcript-aware placement.Improves Codex restored transcript compatibility by sanitizing restored rollouts before writing: strips
encrypted_contentfromreasoningitems and dropscompaction/compaction_summaryentries (including insidecompacted.replacement_history). Includes tests for nested rollout lookup, restored path resolution, transcript sanitization, and resume command display output.Reviewed by Cursor Bugbot for commit f797c46. Configure here.