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

Tool Use Validation Failure: Missing Corresponding Tool Result Block

Open illusivejosiah opened this issue 6 months ago • 2 comments

Bug Description ⎿ Interrupted by user ⎿ Interrupted by user ⎿ Interrupted by user ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.93: tool_use ids were found without tool_result blocks immediately after: toolu_01LZdw3GYNx1f66wycmmzxpP. Each tool_use block must have a corresponding tool_result block in the next message."}}

Environment Info

  • Platform: macos
  • Terminal: cursor
  • Version: 1.0.17
  • Feedback ID: a637f51e-b993-46eb-8e42-d718b261bba3

Errors

[{"error":"Error: Tool exit_plan_mode not found\n    at qN2 (file:///Users/user/node_modules/@anthropic-ai/claude
{"error":"Error: Tool exit_plan_mode not found\n    at qN2 (file:///Users/user/node_modules/@anthropic-ai/claude-code/cli.js

I believe the issue happens more frequently after interrupting a process.

illusivejosiah avatar Jun 08 '25 01:06 illusivejosiah

WORKAROUND:

Note that if you fork the conversation (tap esc twice and select a previous message before the error), you can bypass it.

illusivejosiah avatar Jun 08 '25 01:06 illusivejosiah

Also see Issue #473 as this is a duplicate issue but @illusivejosiah has a better solution that is not mentioned there.

jslitzkerttcu avatar Jun 08 '25 13:06 jslitzkerttcu

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 09 '25 14:08 github-actions[bot]