[BUG] Claude-code wronlgy sending each user request twice to Anthropic model
Resolved 💬 7 comments Opened Mar 2, 2026 by Escain Closed Apr 17, 2026
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?
Claude-code request the sever twice for each user prompt.
First, it makes a call for claude-haiku to get the quota/auth. This is ok.
Then, for each request, it calls:
1) claude-opus with max_tokens 32000, stream=true
2) claude-opus with max_tokens 21333, stream=false
I don't know if the two copies are billed or only one, probably both.
Related with https://github.com/anthropics/claude-code/issues/21969
What Should Happen?
Claude-code should request the server only once per user prompt.
Error Messages/Logs
Steps to Reproduce
- Run claude
- Say "hi"
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.63
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗