[BUG] Opus usage charged when using Haiku model
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I've noticed an issue with usage billing where Opus model usage is being charged even though I'm exclusively using the Haiku model. This billing discrepancy has caused unexpected quota exhaustion for a model I haven't been using. While using --model haiku in headless mode, Opus usage is being charged instead. This has resulted in:
- Significant consumption of my weekly general limit
- Depletion of Opus quota despite never selecting or using the Opus model
What Should Happen?
- When using Haiku model, only Haiku usage should be counted
- Opus usage counter should remain unchanged when Haiku is selected
Error Messages/Logs
Steps to Reproduce
- Run Claude Code in headless mode with Haiku model: claude -p 'example prompt' --model haiku
- Execute multiple prompts using the --model haiku flag
- Check usage statistics
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.31
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
- I have not manually selected Opus model at any point
- All my recent work has been done with --model haiku or --model sonnet flag in headless mode
- Despite this, Opus usage metrics show consumption
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/8688
- https://github.com/anthropics/claude-code/issues/10249
- https://github.com/anthropics/claude-code/issues/10725
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This would explain some things...
● Claude Opus limit reached, now using Sonnet 4.5
● Summary
...
> /model
⎿ Kept model as haiku
Me too. Explicitly set Haiku. 03:24 AM claude-haiku-4-5-20251001
⏺ Read(file_path: " ⎿ Read 30 lines
⏺ Claude Opus limit reached, now using Sonnet 4.5 03:24 AM claude-sonnet-4-5-20250929
My entire history with timestamps is like this. I haven't used Opus once, and I am out of credit on Max plan.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.