Codex sub-agent created in copy mode incorrectly counts full usage (Codex)
Quick fix
Upgrade to v3.18.0; it fixes double-counted historical usage for copy-mode sub-agents and rebuilds session-sourced usage.
Symptom
Section titled “Symptom”codex创建子代理采用复制模式的时候,会被错误的统计全量用量When Codex creates a sub-agent in copy mode, the full usage is incorrectly counted
When Codex creates a sub-agent with parent-session memory in copy mode, the sub-agent loads the historical session. v3.17.0 counts this history, which is identical to the main session, as new actual consumption, causing usage to be double-counted.
In the same issue, the agent streaming record path may also write duplicate usage due to a missing stable idempotency key. The maintainer confirmed that v3.18.0 fixes both the double-counting of session-sourced usage and the duplicate amplification on the agent path; historical duplicate agent rows written before the upgrade are not cleaned up automatically.
Upgrade CC Switch to v3.18.0.
On the first launch after the upgrade, let the program automatically back up and rebuild session-sourced usage to restore the real statistics.
If you need to handle historical duplicate agent records written before the upgrade, note that they are not cleaned up automatically.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
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.