Skip to content

Codex compressed rollouts are skipped after a Codex update #1888

Closed

Description

@HenryTeo27

What happened?

After a Codex update on October 14 migrated local rollouts to .jsonl.zst, ccusage codex monthly stopped counting nearly one third of the recorded tokens in my local history. The logs are still present, but the Codex adapter discovers only .jsonl files, so it skips compressed sessions and archives.

Steps to reproduce

  1. Use a Codex home with .jsonl.zst rollouts under sessions/ or archived_sessions/.
  2. Run npx [email protected] codex monthly --offline --json.
  3. Compare with a separate copy of the same logs unpacked to .jsonl. Usage from the compressed files is missing from the first report.

Expected behavior

Read both formats directly and preserve session IDs, replay detection, and deduplication.

Version

20.0.31, Windows x64.

Fix prepared for review

I pushed a fix to HenryTeo27:codex/fix-codex-zstd-rollouts, commit 431a3087. It streams Zstandard logs through the existing parser and replay code and deduplicates compressed/plain copies.

On a frozen copy of my logs, the fixed daily, monthly, and session JSON reports match the unpacked versions exactly. All 144 Codex adapter tests, including nine new compression tests, and four Codex CLI tests pass. Formatting and Codex Clippy checks pass. The full Windows workspace run has four failures in unchanged path-related tests; Nix checks were unavailable locally.

Could you review this branch and approve a PR under the contribution process, or open a PR from it for review and possible merge? GitHub currently rejects PR creation from my account because the upstream repository allows collaborators only. I would like to contribute this fix and can address review feedback.

Activity

  1. pullfrog commented on Oct 14, 2026

    @pullfrog
    Contributor
  2. added
    bugSomething isn't working
    priority:highHigh user impact or an important regression.
    triage:maintainableFits the repository's maintainable scope and needs review.
    on Oct 14, 2026
  3. github-actions commented on Oct 14, 2026

    @github-actions
    Contributor

    Pullfrog triage: priority:high
    Kind: bug
    Maintenance fit: maintainable
    Confidence: high

    Codex changed rollouts to .jsonl.zst and ccusage skips them because discovery only collects .jsonl extension, causing about one third of tokens to be missing from monthly reports. This is a material usage undercount and incompatibility with current Codex logs, directly breaking the core reporting promise.

    Decision: kept open; Pullfrog will attempt a focused implementation PR.

  4. HenryTeo27 commented on Oct 14, 2026

    @HenryTeo27
    ContributorAuthor

    @ryoppippi Hi, I opened #1888 after the Codex update migrated local rollouts to .jsonl.zst, causing ccusage to omit nearly one third of recorded usage in my local history. I prepared and pushed a tested fix in my branch, commit 431a3087. I'd be happy to contribute this fix and address review feedback.

    The issue passed automatic triage as a high-priority bug, but the implementation workflow failed before PR publication. The artifact step reported Pullfrog declined implementation after creating local commits: the bot initially returned implementation: prepared, then a post-run retry committed the changes and returned implementation: none.

    Could you review the branch and open a PR from it, or approve this contribution and rerun the failed workflow? GitHub rejects both upstream PR creation and workflow reruns from my account due to repository permissions.

  5. kcharlan commented on Oct 14, 2026

    @kcharlan

    Just adding my +1 as I am having the same issue, on MacOS 27.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:highHigh user impact or an important regression.triage:maintainableFits the repository's maintainable scope and needs review.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions