[BUG] API Error: 400 `tool_use` ids were found without `tool_result` blocks immediately after: toolu_..... Each `tool_use` block must have a corresponding `tool_result` block in the next message.

Resolved 💬 5 comments Opened Jul 18, 2025 by ivan-velikanov Closed Sep 18, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [X] Other: Claude Pro used for accessing anthropic api
  • Claude CLI version: 1.0.55
  • Operating System: Windows 11, WSL Ubuntu
  • Terminal: ZSH

Bug Description

Anything I do is getting blocked with this error:

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

Steps to Reproduce

  1. use normally
  2. let is auto upgrade to 1.0.55
  3. notice this issue

Expected Behavior

This error should not at all come.

Actual Behavior

After auto upgrade to 1.0.55 anything i do results in this error.

Additional Context

Earlier today this error happend -> #3836 with version 1.0.54, now i see this error with 1.0.55
I also faced a lot of API Error: Request timed out. but it went fine mostly.
Maybe claude code/claude cli could have options to prevent auto-upgrade and options to allow downgrade (this way we can test and confirm, if the problem is in a particular version)
Related issue: #1894

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗