[BUG]

Resolved 💬 3 comments Opened Dec 13, 2025 by AceTheDactyl Closed Feb 14, 2026

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?

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.52.content.0: unexpected tool_use_id found in tool_result blocks: toolu_01TpBqJnBCv5MC5LbVDUx8v1. Each tool_result block must have a corresponding tool_use block in the previous message."},"request_id":"req_011CW3hzCNFwRpiALfbnrCJ5"}

What Should Happen?

the prompt should run

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.52.content.0: unexpected tool_use_id found in tool_result blocks: toolu_01TpBqJnBCv5MC5LbVDUx8v1. Each tool_result block must have a corresponding tool_use block in the previous message."},"request_id":"req_011CW3hzCNFwRpiALfbnrCJ5"}

Steps to Reproduce

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.52.content.0: unexpected tool_use_id found in tool_result blocks: toolu_01TpBqJnBCv5MC5LbVDUx8v1. Each tool_result block must have a corresponding tool_use block in the previous message."},"request_id":"req_011CW3hzCNFwRpiALfbnrCJ5"}

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

4.5

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

my first bug report

View original on GitHub ↗

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