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 totals are inflated when duplicate token_count events repeat unchanged total_token_usage #876
I can reproduce inflated Codex totals with the current released CLI (@ccusage/codex18.0.8).
On my local logs, the overcount comes from summing info.last_token_usage even when consecutive token_count events carry the same cumulative info.total_token_usage.
I checked this against my own session JSONL files and local Codex SQLite state, and PR #824 appears to be the correct fix for this specific duplicate-total pattern.
Thank you for the report/suggestion and for the related TypeScript-era work.
I am sorry that the Rust migration made the original TypeScript implementation no longer mergeable as-is. The production CLI has moved from the TypeScript implementation to the Rust implementation under rust/crates/ccusage. The related TypeScript PR has been closed as obsolete, so I am closing this issue as well to keep the tracker focused.
If this behavior is still needed, please open a fresh issue or PR against the current Rust CLI with current-version output and a minimal reproduction or concrete use case.
Activity
ryoppippi commentedon May 19, 2026
Thank you for the report/suggestion and for the related TypeScript-era work.
I am sorry that the Rust migration made the original TypeScript implementation no longer mergeable as-is. The production CLI has moved from the TypeScript implementation to the Rust implementation under
rust/crates/ccusage. The related TypeScript PR has been closed as obsolete, so I am closing this issue as well to keep the tracker focused.If this behavior is still needed, please open a fresh issue or PR against the current Rust CLI with current-version output and a minimal reproduction or concrete use case.