Tool Use Validation Failure: Missing Corresponding Tool Result Block
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.
WORKAROUND:
Note that if you fork the conversation (tap esc twice and select a previous message before the error), you can bypass it.
Also see Issue #473 as this is a duplicate issue but @illusivejosiah has a better solution that is not mentioned there.
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.