Skip to content

Remove ghost snapshots #19481

Merged
pakrym-oai merged 7 commits intomainfrom
pakrym/delete-ghost-snapshots
Apr 28, 2026
Merged

Remove ghost snapshots #19481
pakrym-oai merged 7 commits intomainfrom
pakrym/delete-ghost-snapshots

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

Summary

  • Remove ghost_snapshot / GhostCommit from the Responses API surface and generated SDK/schema artifacts.
  • Keep legacy config loading compatible, but make undo a no-op that reports the feature is unavailable.
  • Clean up core history, compaction, telemetry, rollout, and tests to stop carrying ghost snapshot items.

Testing

  • Unit tests passed for codex-protocol, codex-core targeted undo and compaction flows, codex-rollout, and codex-app-server-protocol.
  • Regenerated config and app-server schemas plus Python SDK artifacts and verified they match the checked-in outputs.

…napshots

# Conflicts:
#	codex-rs/core/src/session/mod.rs
#	codex-rs/features/src/lib.rs
#	codex-rs/features/src/tests.rs
@pakrym-oai pakrym-oai changed the title Remove ghost snapshots from the Responses API Remove ghost snapshots Apr 25, 2026
@pakrym-oai pakrym-oai marked this pull request as ready for review April 25, 2026 05:34
@pakrym-oai pakrym-oai requested a review from a team as a code owner April 25, 2026 05:34
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 119 to 121
pub(crate) fn for_prompt(mut self, input_modalities: &[InputModality]) -> Vec<ResponseItem> {
self.normalize_history(input_modalities);
self.items
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break any session with ghost snapshot in it but we shouldn't have had any in a while so good for me

@pakrym-oai
Copy link
Copy Markdown
Collaborator Author

pakrym-oai commented Apr 28, 2026

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

@pakrym-oai pakrym-oai merged commit 4e05f30 into main Apr 28, 2026
25 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/delete-ghost-snapshots branch April 28, 2026 01:48
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 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.

2 participants