Skip to content

[Bug] Anthropic API Error: Unexpected tool_use_id in tool_result blocks #11064

Description

@wehriam

Bug Description
API errors associated with "unexpected tool_use_id found in tool_result blocks"

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 2.0.33
  • Feedback ID: 112546c1-c7af-42f8-add4-9486b535fc71

Errors

[{"error":"Error: Error parsing line in /home/node/.claude/projects/-workspace/8f55bb65-f81c-4f6c-92f0-b0201d4770cb.jsonl: SyntaxError: JSON Parse error: Expected '}'\n    at <anonymous> (/$bunfs/root/claude:81:85)\n    at map (native:1:11)\n    at kl (/$bunfs/root/claude:81:29)\n    at async I8T (/$bunfs/root/claude:3611:2148)\n    at async zhB (/$bunfs/root/claude:3818:312)\n    at processTicksAndRejections (native:7:39)\n    at spawnSync (unknown)\n    at spawnSync (node:child_process:226:22)\n    at execSync (node:child_process:275:109)\n    at A (/$bunfs/root/claude:1470:514)\n    at TjH (/$bunfs/root/claude:1470:692)\n    at RjH (/$bunfs/root/claude:1470:1222)","timestamp":"2025-11-05T15:46:57.211Z"},{"error":"Error\n    at YU (/$bunfs/root/claude:54:1142)\n    at <anonymous> (/$bunfs/root/claude:59:10044)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:862:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:61:2146)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:46:57.471Z"},{"error":"Error: 1: 1 \n    at NaH (/$bunfs/root/claude:1637:4057)\n    at async VaH (/$bunfs/root/claude:1637:1648)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:46:58.297Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11880)\n    at X (/$bunfs/root/claude:81:5170)\n    at <anonymous> (node:fs:247:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:04.887Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11880)\n    at X (/$bunfs/root/claude:81:5170)\n    at <anonymous> (node:fs:247:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:12.330Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11880)\n    at X (/$bunfs/root/claude:81:5170)\n    at <anonymous> (node:fs:247:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:29.816Z"},{"error":"Error: Error parsing line in /home/node/.claude/projects/-workspace/8f55bb65-f81c-4f6c-92f0-b0201d4770cb.jsonl: SyntaxError: JSON Parse error: Expected '}'\n    at <anonymous> (/$bunfs/root/claude:81:85)\n    at map (native:1:11)\n    at kl (/$bunfs/root/claude:81:29)\n    at async <anonymous> (/$bunfs/root/claude:3610:2006)\n    at async <anonymous> (/$bunfs/root/claude:3610:1724)\n    at async getAllTranscripts (/$bunfs/root/claude:3610:719)\n    at async yzB (/$bunfs/root/claude:3611:1731)\n    at async ju (/$bunfs/root/claude:3637:3195)\n    at async J (/$bunfs/root/claude:2775:3308)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:33.054Z"},{"error":"Error: Error parsing line in /home/node/.claude/projects/-workspace/8f55bb65-f81c-4f6c-92f0-b0201d4770cb.jsonl: SyntaxError: JSON Parse error: Expected '}'\n    at <anonymous> (/$bunfs/root/claude:81:85)\n    at map (native:1:11)\n    at kl (/$bunfs/root/claude:81:29)\n    at async I8T (/$bunfs/root/claude:3611:2148)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:35.653Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11880)\n    at X (/$bunfs/root/claude:81:5170)\n    at <anonymous> (node:fs:247:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:38.410Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11880)\n    at X (/$bunfs/root/claude:81:5170)\n    at <anonymous> (node:fs:247:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:42.722Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0.content.0: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01QXBTrEFSaQvyhCVqMfMucN. Each `tool_result` block must have a corresponding `tool_use` block in the previous message.\"},\"request_id\":\"req_011CUq1EJw16X85qvXAujtp6\"}\n    at generate (/$bunfs/root/claude:381:26108)\n    at makeRequest (/$bunfs/root/claude:660:5356)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-05T15:47:53.414Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\"%2

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions