"Each tool_use block must have a corresponding tool_result block in the next message" when interrupting Sonnet 4.5 convo during tool call #2139

Closed
opened 2026-02-16 17:34:20 -05:00 by yindo · 2 comments
Owner

Originally created by @hellowodl on GitHub (Oct 16, 2025).

AI_APICallError: messages.125: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_016GGBqBmVVf9JWMNFbWA781. Each `tool_use` block must have a corresponding `tool_result` block in the next message.

This error presents itself when I interrupt a conversation whilst a tool call is active and hasn't responded.
The model is Sonnet 4.5

Originally created by @hellowodl on GitHub (Oct 16, 2025). ```AI_APICallError: messages.125: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_016GGBqBmVVf9JWMNFbWA781. Each `tool_use` block must have a corresponding `tool_result` block in the next message.``` This error presents itself when I interrupt a conversation whilst a tool call is active and hasn't responded. The model is Sonnet 4.5
yindo closed this issue 2026-02-16 17:34:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 16, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2720: Same error about tool_use blocks found without corresponding tool_result blocks
  • #1662: Identical error message with tool_use ids found without tool_result blocks, also occurs regularly with Sonnet 4
  • #2214: Same error specifically when interrupting responses mid-flight
  • #41: Describes interrupting tool calls breaking message sending (closed but related)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 16, 2025): This issue might be a duplicate of existing issues. Please check: - #2720: Same error about tool_use blocks found without corresponding tool_result blocks - #1662: Identical error message with tool_use ids found without tool_result blocks, also occurs regularly with Sonnet 4 - #2214: Same error specifically when interrupting responses mid-flight - #41: Describes interrupting tool calls breaking message sending (closed but related) Feel free to ignore if none of these address your specific case.
Author
Owner

@hellowodl commented on GitHub (Oct 16, 2025):

Duplicate

@hellowodl commented on GitHub (Oct 16, 2025): Duplicate
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2139