-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Claude cost] Usage & Spend shows one claude-swap account because the cost scan reads a single home #2954
Copy link
Copy link
Open
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Summary
The Usage & Spend pane prices Claude usage from one home directory only. I run two subscriptions through claude-swap, and sessions from the second slot never show up in the 30-day totals. The pane does not error, it just undercounts.
The menu bar tracks rate windows for every swap account, and #2713 extended that to the dashboard-v1 snapshot. Spend was left out of that work because
claude-swap listcarries no spend field. The Usage & Spend pane still has the gap.Environment
CLAUDE_CONFIG_DIRhome per swap slotReproduction
Observed behavior
~/.claudesessions. The local cost cache (claude-v6.json) holds 6,978 scanned files. Every one sits under~/.claude/projects. The second slot's home has zero.cswap listreports both accounts and the menu bar shows windows for both, so the inventory is there.Cause (source at f15f142)
SpendDashboardControllerbuilds one input per non-Codex provider fromtokenSnapshotPublicationForCurrentProviderConfig(for:)(Sources/CodexBar/SpendDashboardController.swift:224-247). Codex gets per-account treatment:codexRequestswalks every visible account with its own home path and cache identity (line 468). Claude has no counterpart, so every slot except the scanned home is invisible to spend.Expected behavior
What Codex already does:
CLAUDE_CONFIG_DIROpen question
My configured Claude directory (a non-default home) also has zero files in the cost cache. I could not tell whether the cost scan honors
claudeConfigDirectoryat all, or only the default~/.claude. Worth confirming while the scan scope is open.