[BUG] "message":"messages.2: `tool_use` ids were found without

Resolved 💬 6 comments Opened Oct 4, 2025 by agomeister Closed Dec 9, 2025

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?

Started getting:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.2: tool_use ids were found without tool_result
blocks immediately after: toolu_01WfcdLcUZ7tejmGjCooYqbA. Each tool_use block must have a corresponding tool_result block in the next
message."},"request_id":"req_011CTmkCfzzTfPAhZ3d1TRDv"}

Using uptodate Claude Code Sonnet 4.5 · Claude Max . Using in VSCode Win11.

What Should Happen?

There should no such error. Using the product is strongly halted.

Error Messages/Logs

Steps to Reproduce

  1. Start Claude Code in VSCode Windows 11
  2. Run prompt, basically analyze Java file, PDF file, it seems PDF file analysis gets this error.
  3. But, also later prompts without PDF, just prompts give this.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.5 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="2209" height="677" alt="Image" src="https://github.com/user-attachments/assets/61c8f062-f71c-490f-b8c7-d39fbaa429b5" />

View original on GitHub ↗

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