Skip to content

Codex usage statistics abnormally high or stopped updating

Quick fix

Identify the problem type and upgrade to the corresponding fix version; fork double counting was fixed in v3.18.0, Windows file growth missed syncing in…

Error output
Codex 正常运行,但 CC Switch 的 Codex 统计用量停止更新。
English translation

Codex runs normally, but CC Switch's Codex usage statistics stop updating.

These issues cover several different Codex usage problems, not a single fault: fork sessions may double-count the parent session history; cumulative token snapshots may overestimate usage when they regress, replay, or interleave across rate_limits.limit_id; on Windows, a rollout file can grow while its mtime stays unchanged, causing missed syncing; two-segment filenames of resumed sessions can cause a file to be deferred indefinitely; a fork after the parent session ends may also wait forever. There are also separate problems such as dashboard summary cards not refreshing, inconsistent quota calculations, and switching to the API when account quota is exhausted, which cannot be covered by one fix. The issues explicitly confirm that the fork double-counting fix shipped with v3.18.0 and the Windows file growth missed-syncing fix shipped with v3.20.3; for the other problems, the material has no unified conclusion about a released fix.

  1. First check the specific symptoms in the CC Switch logs: if usage jumps sharply right after a fork, confirm the version is v3.18.0 or higher; if on Windows the file keeps growing but statistics stall, upgrade to v3.20.3 or higher.

  2. If after resuming a session the logs repeatedly show “文件名线程 ID ... 与 root meta ID ... 不一致”, or a fork session stays deferred, keep the relevant logs and retest on the latest version; provide the version number and the corresponding scenario, as the issue gives no directly executable user-side fix steps.

  3. If Codex detail records are stored but the dashboard summary card does not update, or the official account quota display is inconsistent, retest on the latest version; record the card numbers, database comparison, screenshots, and version number to help locate the problem.

ToolCodex
VersionUnknown
PlatformsWindowsmacOSLinux
After upgrading, fork sessions still count parent session history into usage. What should I do?
The issue states the fix for this problem shipped with v3.18.0; if it still reproduces on a higher version, report it again with the version and reproduction details.
On Windows the Codex log has new content, but usage no longer grows. What should I do?
v3.20.2 users may still be affected by the unchanged mtime; the issue confirms the fix shipped with v3.20.3.
After resuming a session, usage statistics stop and the log shows the filename thread ID mismatching the root meta ID. What should I do?
That issue records the cause of the persistent deferral but gives no released fix version; retest on the latest version and report the logs, version, and resumed-session scenario.
The dashboard summary card does not refresh, but incremental details are already stored. What should I do?
The issue suggests retesting on the latest version; if it persists, provide the version number, the summary card numbers, and the direct database query results.
Why are the usage statistics inconsistent with the official account quota?
The issue explains that 4.0 reworked the quota and usage display, and the two may use different calculation methods; verify on the latest version and provide the specific page, values, screenshots, and version.

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.