Skip to content

Codex 30d local cost ~8-9% under ccusage while 7d matches #159

Description

@tsouth89

Context

After #158 (ccusage speed-tier + Claude day-window parity), Codex 7d dollars match ccusage within ~0.2% at both --speed auto and standard.

Codex 30d still lands ~8–9% under ccusage on the same machine (tokens and dollars scale together). Not the old 2× priority bug.

Likely causes

  • Older archived_sessions coverage / filename date gates
  • Fork / subagent parent-history replay: Ceiling suppresses replayed parent totals; ccusage may count some of that

Preference

Keep anti-double-count behavior unless we prove ccusage is strictly more correct on real rollouts. Prefer per-day file audit over blindly matching ccusage totals.

Repro

npx ccusage@latest codex daily --json --speed standard --since <30d> --until <today>
codexbar cost -p codex -d 30 --codex-speed standard --json

Compare non-cache input, cache read, output, and total USD.

Acceptance

Either close the gap with a documented methodology change, or document intentional divergence (and when to use 7d for A/B).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions