Repository navigation
Description
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
- Use a Codex home with
.jsonl.zstrollouts undersessions/orarchived_sessions/. - Run
npx [email protected] codex monthly --offline --json. - 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
pullfrog commentedon Oct 14, 2026
github-actions commentedon Oct 14, 2026
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.
HenryTeo27 commentedon Oct 14, 2026
@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 returnedimplementation: prepared, then a post-run retry committed the changes and returnedimplementation: 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.
kcharlan commentedon Oct 14, 2026
Just adding my +1 as I am having the same issue, on MacOS 27.0.1.