[BUG] tool_use ids were found without tool_result blocks immediately after
Resolved 💬 4 comments Opened Aug 13, 2025 by sbrkopac Closed Aug 17, 2025
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [X] Other: Claude Code on WSL2
- Claude CLI version: 1.0.77 (Claude Code)
- Operating System: Ubuntu WSL2
Bug Description
I terminated: Bash (mkdir -p folder) with double escape and my next command I receieved:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.21: tool_use ids
were found without tool_result blocks immediately after: toolu_019MgEXFFrY5MHhv9PqJDRQe. Each tool_use
block must have a corresponding tool_result block in the next message."}}
Steps to Reproduce
Haven't been able to reproduce
Expected Behavior
It should have accepted the next prompt and not 400'd
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗