[Bug] Anthropic API Error: Missing Tool Result Block
Resolved 💬 3 comments Opened Sep 26, 2025 by AlexBangkok83 Closed Sep 29, 2025
Bug Description
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.167: tool_use ids were found
without tool_result blocks immediately after: toolu_019P95AL5DFCUyhtgQDcWJ3x. Each tool_use block must have a
corresponding tool_result block in the next message."},"request_id":"req_011CTWFpbkpKZzpBJezq7xnK"}
Environment Info
- Platform: darwin
- Terminal: windsurf
- Version: 1.0.126
- Feedback ID: bbedfed5-4a67-4cc5-97c6-0bb30ff7a499
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.167: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_019P95AL5DFCUyhtgQDcWJ3x. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTWFo8VwtP772cB7XaHR7\"}\n at new K5 (unknown:1:28)\n at new xY (/$bunfs/root/claude:862:1962)\n at new ZG0 (unknown:1:28)\n at generate (/$bunfs/root/claude:862:2419)\n at makeRequest (/$bunfs/root/claude:879:5359)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T02:53:09.851Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.167: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_019P95AL5DFCUyhtgQDcWJ3x. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTWFpbkpKZzpBJezq7xnK\"}\n at new K5 (unknown:1:28)\n at new xY (/$bunfs/root/claude:862:1962)\n at new ZG0 (unknown:1:28)\n at generate (/$bunfs/root/claude:862:2419)\n at makeRequest (/$bunfs/root/claude:879:5359)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T02:53:28.953Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗