Skip to content

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.

Error output
codex创建子代理采用复制模式的时候,会被错误的统计全量用量
English translation

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.

  1. Upgrade CC Switch to v3.18.0.

  2. On the first launch after the upgrade, let the program automatically back up and rebuild session-sourced usage to restore the real statistics.

  3. If you need to handle historical duplicate agent records written before the upgrade, note that they are not cleaned up automatically.

ToolCodex
Version3.17.0(受影响;v3.18.0 已修复)
PlatformsWindowsmacOS

(No FAQ yet)

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.