[BUG] Repeated API Error 400
Resolved 💬 4 comments Opened Jun 6, 2025 by shaunc Closed Jun 6, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.16
- Operating System: Ubuntu 22.04
- Terminal: bash in vscode
Bug Description
<!-- A clear and concise description of the bug -->
I am getting an API error -- no matter what I type. Here is the last thing I typed:
> I had just asked you to create extensive documentation, as this was a tricky
issue. Read the mathematical background and the test design / analysis framework
carefully, then write documentation on how we tuned, and also user documentation
on how to select # of banks, configure, etc.
⎿ API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"messages.17:
`tool_use` ids were found without `tool_result` blocks immediately after:
toolu_015REhjCAk7wvjVLAxx4tABq. Each `tool_use` block must have a corresponding
`tool_result` block in the next message."}}
Steps to Reproduce
This happened in the middle of a session. When I stopped and restarted (without continue), I still got the same error after two interactions. However, in another window, I was able to restart, and now running for 5 minutes.
Expected Behavior
<!-- What you expected to happen -->
Actual Behavior
<!-- What actually happened -->
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗