claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Opus usage charged when using Haiku model

Open karolgoluch opened this issue 2 months ago • 5 comments

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

  1. Run Claude Code in headless mode with Haiku model: claude -p 'example prompt' --model haiku
  2. Execute multiple prompts using the --model haiku flag
  3. 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

karolgoluch avatar Nov 01 '25 22:11 karolgoluch

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8688
  2. https://github.com/anthropics/claude-code/issues/10249
  3. 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

github-actions[bot] avatar Nov 01 '25 22:11 github-actions[bot]

This would explain some things...

nickheyer avatar Nov 03 '25 08:11 nickheyer

● Claude Opus limit reached, now using Sonnet 4.5

● Summary

    ...

> /model
  ⎿  Kept model as haiku

adrianhelvikspond avatar Nov 06 '25 22:11 adrianhelvikspond

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.

stayce avatar Nov 08 '25 02:11 stayce

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.

github-actions[bot] avatar Dec 09 '25 10:12 github-actions[bot]