Potential Token Consumption Anomaly in Anthropic API Interaction.
Bug Description
Hello, yesterday (25/3) I tested claude code with anthropic API for
the first time. I was surprised how fast I was able to use 40M tokens.
Today I tested a simple "ping" query.
- I created an empty test folder (mkdir test && cd test) just in case.
- ran claude and entered the prompt "ping"
- I got the response "pong"
- I found two entries in the console in the logs at the appropriate time:
- with model claude-3-5-haiku-20241022 about 100 tokens (for example
input 86 / output 22)
- with model claude-3-7-sonnet-20250219 about 15k-20k (for example
input 14210 / output 11)
When I asked claude.ai/chat: "When I sent to you via the claude code
"ping" prompt then I got "pong". And in logs (in console settings
anthropic api) I see about 20k input token spend. How is that
possible?", got "That's an unusual observation. When you send a simple
"ping" prompt, it should not consume anywhere near 20,000 tokens. A
typical "ping" response would be very short and lightweight, consuming
only a few tokens."
Let me ask you too, how is this possible and is it ok?
I have registered the Anthropic API under the email from which I am
writing to you. This is the Claude Code workspace.
Jan Izydorczyk
Environment Info
- Platform: linux
- Terminal: WarpTerminal
- Version: 0.2.54
- Feedback ID: 82df67ce-3530-4292-b261-17e9760bb65f
Errors
[]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗