[Bug] Anthropic API Error: Invalid tool_result block without corresponding tool_use

Resolved 💬 3 comments Opened Dec 7, 2025 by budivoogt Closed Dec 10, 2025

Bug Description
Randomly started getting 500 and 400 errors.\
\
⏺ Now I have a comprehensive understanding of both the competitor and your existing architecture. Let me create the detailed plan document: ⎿ API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":null} ⎿ API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":null} > resume ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.12.content.2: unexpected tool_use_id found in tool_result blocks: toolu_01AWsg9J1epd11QLv56d6JyA. Each tool_result block must have a corresponding tool_use block in the previous message."},"request_id":"req_011CVrnwAtfkBExi7MccREGm"}

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.0.60
  • Feedback ID: 16a55f66-d693-4903-bbb9-7b46a97ab546

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/budi_daily/.local/share/claude/versions/2.0.60 (expected in multi-process scenarios)\n    at Eh0 (/$bunfs/root/claude:2714:1622)\n    at mCA (/$bunfs/root/claude:2714:1300)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:21:55.755Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/budi_daily/.local/share/claude/versions/2.0.60 (expected in multi-process scenarios)\n    at Eh0 (/$bunfs/root/claude:2714:1622)\n    at jCA (/$bunfs/root/claude:2712:35598)\n    at async w$7 (/$bunfs/root/claude:2712:37706)\n    at async iv (/$bunfs/root/claude:2714:236)\n    at async <anonymous> (/$bunfs/root/claude:2714:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:22:04.112Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at readFileSync (/$bunfs/root/claude:12:370)\n    at piB (/$bunfs/root/claude:4490:17669)\n    at call (/$bunfs/root/claude:1404:912)\n    at call (/$bunfs/root/claude:1400:5711)\n    at eq7 (/$bunfs/root/claude:3120:16948)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:26:13.908Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at readFileSync (/$bunfs/root/claude:12:370)\n    at piB (/$bunfs/root/claude:4490:17669)\n    at call (/$bunfs/root/claude:1404:912)\n    at call (/$bunfs/root/claude:1400:5711)\n    at eq7 (/$bunfs/root/claude:3120:16948)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:26:34.821Z"},{"error":"Error\n    at qf (/$bunfs/root/claude:174:1143)\n    at <anonymous> (/$bunfs/root/claude:175:10080)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:177:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:28:31.194Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":null}\n    at generate (/$bunfs/root/claude:109:10609)\n    at makeRequest (/$bunfs/root/claude:1237:5434)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:40:56.016Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.12.content.2: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01AWsg9J1epd11QLv56d6JyA. Each `tool_result` block must have a corresponding `tool_use` block in the previous message.\"},\"request_id\":\"req_011CVrnwAtfkBExi7MccREGm\"}\n    at generate (/$bunfs/root/claude:109:10367)\n    at makeRequest (/$bunfs/root/claude:1237:5434)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:42:17.724Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.12.content.2: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01AWsg9J1epd11QLv56d6JyA. Each `tool_result` block must have a corresponding `tool_use` block in the previous message.\"},\"request_id\":\"req_011CVrnwfnyY989yE6rWn93a\"}\n    at generate (/$bunfs/root/claude:109:10367)\n    at makeRequest (/$bunfs/root/claude:1237:5434)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-07T05:42:24.474Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗