You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex reports still read entire session JSONL files into memory #1124
ccusage codex daily on current Rust code still reads each Codex session JSONL file fully into memory before line scanning.
This reproduces the large-session failure mode from #952 for the current unified ccusage codex path. In rust/crates/ccusage/src/codex_loader.rs, visit_codex_session_file used fs::read(path), so a multi-GB Codex session can exhaust memory before the marker filter or aggregation has a chance to run.
Impact
Long-lived Codex Desktop sessions can grow to GB-sized JSONL files. When that happens, npx ccusage@latest codex daily can consume enough memory that macOS starts pausing applications or the process fails before producing a report.
Proposed fix
I opened PR #1123 to stream Codex sessions with BufReader::read_until on newline bytes and reuse the same line buffer, preserving the existing token-count parsing and model tracking behavior while bounding memory to the largest line instead of the whole file.
Release binary smoke test with a ~95 MB synthetic Codex session fixture via CODEX_HOME=/private/tmp/ccusage-codex-large-fixture rust/target/release/ccusage codex daily --offline --json
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current main implementation covers this request. This item is kept for history and does not need to be reopened.
Activity
github-actions commentedon May 22, 2026
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies
lgtmi, your future issues will stay open. If a maintainer replieslgtm, your future issues and PRs will stay open.See CONTRIBUTING.md.
blain3white commentedon Jun 9, 2026
I'm the maintainer of Clean My Agent. This is close to its scope: local AI-agent storage scanning across JSONL/SQLite-style sources, with backup and export on top: https://github.com/blain3white/clean-my-agent
ryoppippi commentedon Aug 31, 2026
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current
mainimplementation covers this request. This item is kept for history and does not need to be reopened.