Repository navigation
fix(codex): read rollouts Codex has compressed to .jsonl.zst - #85
Merged
Merged
Conversation
Codex compresses a rollout it hasn't written to for 7 days, replacing rollout-<ts>-<id>.jsonl with rollout-<ts>-<id>.jsonl.zst. The store matched .jsonl only, so those sessions stopped listing. Discovery now lists a compressed rollout, decoding only as far as its header line, load decodes it, and delete accepts its path. When both forms are on disk the plain one lists, as Codex itself reads it. Saving still writes plain .jsonl. Decoding uses the zstd crate behind a new default feature, codex_zstd, so the wasm build goes without the C library. Fixes #84 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Issue: #84
What changed and why?
Codex now compresses a rollout it hasn't written to for 7 days, replacing
rollout-<ts>-<id>.jsonlwithrollout-<ts>-<id>.jsonl.zst. The Codex store matched.jsonlonly, so those sessions stopped listing. On my machine that was 781 of 814.The store now reads both forms.
discoverlists a compressed rollout. It decodes only as far as the header line, so listing stays cheap.loaddecodes the whole file.deleteaccepts a.jsonl.zstpath.saveis unchanged and writes plain.jsonl.Decoding uses the
zstdcrate, the library Codex writes these files with. It was already inCargo.lockthroughwreq. It sits behind a new default feature,codex_zstd, because zstd is C and the wasm build can't take it. Anyone building withdefault-features = falseneeds to addcodex_zstdto keep seeing old Codex sessions.I checked it against the real sessions on my machine. All 785 compressed rollouts, 2.2 GB plain, load to exactly what their
zstd -dcoutput loads to. Discovering all 819 sessions takes 38 ms. On one thread, loading every compressed session takes 2.6 s, against 1.3 s for the same sessions plain.One thing I left alone.
cargo test -p txcript --no-default-featuresfailsstore_delete::antigravity_delete_roundtripon main today, before this change.🤖 Generated with Claude Code