Feature Request: optional zstd compression for already-archived local rollout files
What variant of Codex are you using?
App, CLI
What feature would you like to see?
This is a narrow follow-up to the broader session storage / cleanup discussions in openai/codex#6015, openai/codex#20230, and the closed openai/codex#17000.
I am not requesting automatic deletion, retention policy, pruning, or active-rollout compression.
The request is only: after a user has already archived a local thread, optionally store that archived rollout as .jsonl.zst, and decompress it back to .jsonl when the thread is unarchived.
Due to the narrower scope, this change should be relatively localized: it can be implemented around the existing archive/unarchive flow without changing active rollout recording or the JSONL logical format.
Scope:
archived_sessions/*.jsonl->archived_sessions/*.jsonl.zst
Active sessions:
- unchanged, still append-only JSONL
Unarchive:
.jsonl.zst->.jsonlundersessions/YYYY/MM/DD/
Default:
- off / opt-in initially
Failure behavior:
- temp file + atomic rename
- never delete original until compressed file is verified
- existing .jsonl archives remain supported
Acceptance criteria:
- active rollout files remain plain append-only
.jsonl - archived
.jsonlfiles can optionally be rewritten as.jsonl.zst - both
.jsonland.jsonl.zstarchived files remain listable and unarchivable - unarchive restores a plain
.jsonlundersessions/YYYY/MM/DD/ - compression failure leaves the original archived
.jsonlintact - state DB metadata always points to an existing rollout file
Additional information
If maintainers prefer to keep this under openai/codex#6015 or openai/codex#20230, I’m happy to move the proposal there. I’m filing it separately because it is a small, self-contained storage optimization that does not require a retention/deletion policy decision.
Relationship to existing issues
This overlaps with the general local-session storage concern in openai/codex#6015, openai/codex#20230, openai/codex#18849, and openai/codex#18839, and with the closed openai/codex#17000.
The difference is scope:
- openai/codex#6015 / openai/codex#6526: retention and automatic deletion policies
- openai/codex#20230: review and clearing workflow for old CLI sessions
- openai/codex#13018 / openai/codex#20251: explicit delete controls for threads/session data
- openai/codex#18849 / openai/codex#18839 / openai/codex#19483 / openai/codex#20864: local session storage and scan/performance symptoms
- openai/codex#18693 / openai/codex#22004 / openai/codex#21948 / openai/codex#18629: very large active or image-heavy rollout/history problems
- this request: lossless cold-storage compression only for files the user has already archived
It intentionally avoids policy decisions about what to delete, how long to retain data, or whether active rollouts should change format.