Usage statistics are massively inflated, Codex
Quick fix
Upgrade to cc-switch v3.18.0 or later, then rebuild Codex usage on the usage page to fix double counting.
Symptom
Section titled “Symptom”统计出的Codex用量极其夸张,20亿, 80亿非常离谱的统计数据The reported Codex usage is wildly inflated: 2 billion, 8 billion—extremely implausible statistics.
Double counting of fork/sub-agent usage introduced in cc-switch v3.17.0 can massively inflate Codex usage; duplicate records on the proxy side may also cause usage rows to accumulate. The maintainers said both issues were fixed in v3.18.0. In another issue, the modification time of Codex session JSONL files on Windows may remain unchanged, causing cc-switch to assume the files have not changed and miss newly added tokens. In addition, contexts longer than 200K may incur double charges, so local statistics may still differ from relay data.
Upgrade to cc-switch v3.18.0 or later. This version fixes fork/sub-agent usage double counting and uses idempotent, stable keys to record proxy usage.
After upgrading, wait for the first launch to rebuild Codex usage automatically in the background, or manually click “Rebuild Codex Usage” on the usage page.
If session usage on Windows is not updated promptly, fully quit Codex, then restart it and reopen the original conversation. An issue comment says this updates the modification time of the corresponding JSONL file.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- How can I get the dashboard numbers back to their actual values after upgrading?
- On the first launch after upgrading, Codex usage is gradually rebuilt automatically in the background. You can also manually click “Rebuild Codex Usage” on the usage page.
- Why do cc-switch usage statistics still differ from the relay’s usage data?
- An issue comment says Codex on Windows may continue writing to session JSONL files without updating their modification time, so cc-switch does not reread them. The comment also says contexts longer than 200K may incur double charges.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.