Feature Request: optional zstd compression for already-archived local rollout files

Open 💬 0 comments Opened May 11, 2026 by JoeyTeng

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 -> .jsonl under sessions/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 .jsonl files can optionally be rewritten as .jsonl.zst
  • both .jsonl and .jsonl.zst archived files remain listable and unarchivable
  • unarchive restores a plain .jsonl under sessions/YYYY/MM/DD/
  • compression failure leaves the original archived .jsonl intact
  • 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.

View original on GitHub ↗