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

Resolved 💬 3 comments Opened Dec 15, 2025 by sh4d0w Closed Dec 19, 2025

Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.18.content.1: unexpected tool_use_id found in tool_result blocks:
toolu_01MehK81yaNZTg1LPuPDYDYk. Each tool_result block must have a corresponding tool_use block in the previous message."},"request_id":"req_011CW8JVY9vM8ZQnME4WMX65"}

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.0.64
  • Feedback ID: f79e3def-49fc-48cc-be1f-d02936f38c8c

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/katana/.local/share/claude/versions/2.0.64 (expected in multi-process scenarios)\n    at BMB (/$bunfs/root/claude:2589:1618)\n    at lTA (/$bunfs/root/claude:2589:1296)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T09:57:22.769Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/katana/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at BMB (/$bunfs/root/claude:2589:1618)\n    at cTA (/$bunfs/root/claude:2587:35604)\n    at async iTA (/$bunfs/root/claude:2589:3428)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T09:57:22.769Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/katana/.local/share/claude/versions/2.0.62 (expected in multi-process scenarios)\n    at BMB (/$bunfs/root/claude:2589:1618)\n    at cTA (/$bunfs/root/claude:2587:35604)\n    at async iTA (/$bunfs/root/claude:2589:3428)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T09:57:22.777Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/katana/.local/share/claude/versions/2.0.61 (expected in multi-process scenarios)\n    at BMB (/$bunfs/root/claude:2589:1618)\n    at cTA (/$bunfs/root/claude:2587:35604)\n    at async iTA (/$bunfs/root/claude:2589:3428)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T09:57:22.778Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/katana/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at BMB (/$bunfs/root/claude:2589:1618)\n    at cTA (/$bunfs/root/claude:2587:35604)\n    at async GcD (/$bunfs/root/claude:2587:37705)\n    at async wj (/$bunfs/root/claude:2589:236)\n    at async <anonymous> (/$bunfs/root/claude:2589:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T09:57:30.919Z"},{"error":"SyntaxError: JSON Parse error: Invalid number\n    at <parse> (:0)\n    at parse (unknown)\n    at <anonymous> (/$bunfs/root/claude:62:729)\n    at A (/$bunfs/root/claude:11:6895)\n    at Ss9 (/$bunfs/root/claude:1245:3166)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T09:59:12.780Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.18.content.1: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01MehK81yaNZTg1LPuPDYDYk. Each `tool_result` block must have a corresponding `tool_use` block in the previous message.\"},\"request_id\":\"req_011CW8JVY9vM8ZQnME4WMX65\"}\n    at generate (/$bunfs/root/claude:124:10429)\n    at makeRequest (/$bunfs/root/claude:1099:5434)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T10:18:49.354Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/katana/.local/share/claude/versions/2.0.65 (expected in multi-process scenarios)\n    at BMB (/$bunfs/root/claude:2589:1618)\n    at cTA (/$bunfs/root/claude:2587:35604)\n    at async GcD (/$bunfs/root/claude:2587:37705)\n    at async wj (/$bunfs/root/claude:2589:236)\n    at async <anonymous> (/$bunfs/root/claude:2589:13006)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-15T10:18:51.338Z"}]

View original on GitHub ↗

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