Invalid Tool Use Request in Anthropic API Call

Resolved 💬 4 comments Opened Jul 17, 2025 by charles-dyfis-net Closed Sep 18, 2025

Bug Description
invalid_request_error due to malformed tool use

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 1.0.53
  • Feedback ID: bb9bb3fe-259f-47ca-b534-2d98eba70708

Errors

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

(programmatically provided logs irrelevant on their face, discarded)

View original on GitHub ↗

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