`/cost` overstates cost when on max subscription
Resolved 💬 5 comments Opened May 15, 2025 by max-sixty Closed May 31, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: <!-- output of
claude --version--> 0.2.114 - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> MacOS
- Terminal: <!-- e.g. iTerm2, Terminal App --> Alacritty
Bug Description
after a token expires, /cost reports costs as though I'm not on a Max subscription:
====================================================================== Previous Conversation Compacted ======================================================================
> This session is being continued from a previous conversation that ran out of context. The conversation is summarized below:
Invalid API key · Please run /login.
> /compact
⎿ (no content)
> /cost
⎿ Total cost: $19.64
Total duration (API): 1h 13m 17.9s
Total duration (wall): 12h 1m 56.9s
Total code changes: 3989 lines added, 1577 lines removed
Token usage by model:
claude-3-5-haiku: 236.1k input, 11.6k output, 0 cache read, 0 cache write
claude-3-7-sonnet: 1.4k input, 169.9k output, 31.5m cache read, 2.0m cache write
while not shown, I checked this because it warned me I'd spent $5 (which similarly was overstating the cost)
there was NO actual charge — you can see where I started the Max subscription:
<img width="418" alt="Image" src="https://github.com/user-attachments/assets/22d21968-39a4-4fc6-8ff9-6c59127e9e45" />
(thanks again for the such an incredible product! top 10 product of the decade)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗