claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Missing Tool Result Block in API Request Handling

Open slyfox1186 opened this issue 6 months ago • 1 comments

Bug Description ● Search(pattern: "limit.*50|limit.*49|CONTACTS_PER_PAGE", path: "src/frontend") ⎿  Found 8 files (ctrl+r to expand) ⎿  Interrupted by user ⎿  Interrupted by user ⎿  Interrupted by user

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

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

Environment Info

  • Platform: linux
  • Terminal: vte-based
  • Version: 1.0.17
  • Feedback ID: ce38c274-1072-42a6-a13d-049466160d7a

Errors

[]

slyfox1186 avatar Jun 10 '25 12:06 slyfox1186

Happens if you press esc key to abruptly end the assistant in an active thinking mode.

slyfox1186 avatar Jun 10 '25 12:06 slyfox1186

1.0.21 should resolve this issue. claude update to get the latest version. Let us know if you can still repro!

igorkofman avatar Jun 11 '25 23:06 igorkofman

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 10 '25 14:08 github-actions[bot]