[BUG] /cost Command Underreporting Actual Charges
Bug Description
I noticed the /cost output is no longer matching how much is being deducted from my account on console.anthropic.com/settings/billing and much more money is actually being deducted than what /cost is reporting. For instance, this short session it's telling me the cost was $0.2230 but I was watching my billing page and it went from balance of $15.73 at the start of this session to $14.30 currently so it deducted $1.43 and not $0.22. This was happening for my earlier sessions but I didn't watch them as carefully and just noticed that /cost was claiming I only spent a couple of dollars today but in reality around $12 got deducted. So I started to watch more closely with this current session. What's happening with the billing? Is /cost broken or is it overcharging? It feels like the latter to me based on previous usage.
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 0.2.107
- Feedback ID: 9361be75-a09a-4ebf-8dfd-2b4d0be7415c
14 Comments
The
/costcommand is also for me massively underreporting the actual cost.A few days ago I also asked support to clarify the cost of the “Prompt Caching Read” tokens, as their API prices are quoted at 0.30 USD per MTok, while the actual cost to me is pretty much 0.50 USD per MTok.
I haven't received a response yet. 🙁
good to hear I'm not alone, seems like this might be tied to the move to "max" pricing somehow...
I am also having this. I have stopped using CC for now because of it. Its a non negotiable for me and my devs to be able to be aware of the cost of what we are doing while we do it.
I was just looking into this as well. In today's session reported token count by
/costwas 120k and in the dash 3600k, as well as cost was reported $0.34 vs dash of >$2.Naturally, I asked CC what was going on and ran below prompts in CC whilst also keeping tab on the web-dashboard:
The token count in the web-dashboard after running this was 3,761,607. Thus the deltas were 12k vs 84k.
However, this discrepancy still seems low as
/costreported a token count of 120k up to that point and that was from a session a lot longer that 10x just above prompt and for which the dash reported 3600k. So, both the delta for one prompt is off as well as the token count of/costin-itself.Related https://github.com/anthropics/claude-code/issues/844 and https://github.com/anthropics/claude-code/issues/1017
I am also facing this issue while using claude api via Amazon Bedrock.The cost shown in the billing console is ~6X the cost shown in the Claude Code /cost command.
Also having this issue, except the cost command seems to be correct, what is being removed from the balance seems to be an overcharge. Also, I just noticed that overnight I lost an even 1.00 with no usage on the system. That was a first I noticed too.
update: I noticed there was an update in reference this but it's still off. Here is from my test about 3 minutes ago.
balance: 11.83
New balance: 11.18
Difference: 0.65
The /cost told me six cents, actually took sixty-five cents
Thanks for all these reports. We will make sure our cost reporting is accurate ASAP
This is fixed in the latest version. Restart to update.
Can you share whether the bug was in /cost calculation or the billing? It sure felt like the billing charges were out of hand, in which case I would be expecting some refunds
I too would like more information on this. It was happening for weeks, not days, and since it effects billing, I think being transparent about happened is a good idea.
time for a /refund command.
I can't believe that there was no testing of any kind on this and that all this is working as intended.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.