API Error: 400

Resolved 💬 1 comment Opened Jun 4, 2025 by AkshaySC1188 Closed Jun 4, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <!-- output of claude --version -->
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: <!-- e.g. iTerm2, Terminal App -->

Bug Description

<!-- I was working and suddenly claude code stopped. There is no network issue or anything.

[BUG] API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.115: tool_use ids were found without tool_result blocks immediately after: toolu_01SLcmkcpFGu3x7Qia6qjwGp. Each tool_use block must have a corresponding tool_result block in the next message."}}

-->

Steps to Reproduce

  1. <!-- I dont know how to reproduce. It just happened out of the blue. -->
  2. <!-- Second step -->
  3. <!-- And so on... -->

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. -->

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗