-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Codex cost] Completed scan shows Spend unavailable with grouping-dependent totals #2948
Copy link
Copy link
Open
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Summary
After a completed 30-day Codex history scan, Usage & Spend shows
Spend unavailablefor Codex even though token coverage is established and the CLI can still calculate non-null (but grouping-dependent) cost totals.Restarting CodexBar does not recover the spend display. This appears to be a cost aggregation/completeness regression rather than an incomplete scan.
Environment
arm64)Reproduction
Coverage: 30 / 30.Observed behavior
Tracked tokens: 11BCodex: Spend unavailableModel breakdown unavailablescan_complete = 1.totalCost: null.--group-by projecttop-level resultThe project-grouped result contains 116 project/day rows; only 3 have a null cost, while the ungrouped result has 7 null daily costs.
Expected behavior
CLI evidence
Ungrouped:
Grouped:
Hypothesis
This may be an interaction between the request-level long-context tier preservation added after #2858 and the all-daily-rows-must-have-cost completeness policy added in 0.49.4. The project grouping path appears to retain pricing evidence that the ungrouped daily/model aggregation loses.
I have not attached the raw database or logs because they contain local paths, project names, and session identifiers. I can provide a minimized/redacted fixture or run a diagnostic build if useful.