Remove ghost snapshots #19481
Conversation
…napshots # Conflicts: # codex-rs/core/src/session/mod.rs # codex-rs/features/src/lib.rs # codex-rs/features/src/tests.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7eae03d21f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub(crate) fn for_prompt(mut self, input_modalities: &[InputModality]) -> Vec<ResponseItem> { | ||
| self.normalize_history(input_modalities); | ||
| self.items |
There was a problem hiding this comment.
Filter unknown response items from prompt history
for_prompt now returns self.items unfiltered. Legacy ghost_snapshot entries deserialize as ResponseItem::Other and can enter history via history.replace(...) during rollout reconstruction. Those Other items are then sent to the model as { "type": "other" }, which is not a valid Responses input item and can break resumed compacted threads. Drop Other before building prompt input.
Useful? React with 👍 / 👎.
jif-oai
left a comment
There was a problem hiding this comment.
This will break any session with ghost snapshot in it but we shouldn't have had any in a while so good for me
We filter shapshots on load. see strip_legacy_ghost_snapshot_rollout_line |
Summary
ghost_snapshot/GhostCommitfrom the Responses API surface and generated SDK/schema artifacts.Testing
codex-protocol,codex-coretargeted undo and compaction flows,codex-rollout, andcodex-app-server-protocol.