[Bug] Anthropic API Error: Tool result block missing corresponding tool use block
Resolved 💬 3 comments Opened Dec 16, 2025 by razumnyak Closed Dec 19, 2025
Bug Description
I'm trying to resume a session that was interrupted due to a long execution time.
I typed "continue" and got a 400 error.
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.0.content.0: unexpected tool_use_id found in tool_result blocks:
toolu_01YEUFXUTB3mvkSLMrh7fniG. Each tool_result block must have a corresponding tool_use block in the previous
message."},"request_id":"req_011CW9xwfMAYPaL8t6dQRjFb"}
Last Action in claude code:
⏺ Write(tasks/epic-008/087-DEPENDENCY-<hidden>.md)
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.0.70
- Feedback ID: fc88fc7e-c5f8-4de1-8402-1c8de82c5bd3
Errors
[{"error":"Error: Error parsing line in /Users/<hidden>/.claude/projects/-Users-<hidden>-development-<hidden>-js/86f62c57-5f9c-4eac-8a34-c9a6262bb9f7.jsonl: SyntaxError: Unexpected non-whitespace character after JSON at position 12 (line 1 column 13)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:79\n at Array.map (<anonymous>)\n at hm (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:26)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:3878\n at async Promise.all (index 13)\n at async YPA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:3714)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:9601\n at async MI0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:203)\n at async dm2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:9099)","timestamp":"2025-12-16T07:23:28.147Z"},{"error":"Error: Error parsing line in /Users/<hidden>/.claude/projects/-Users-<hidden>-development-<hidden>-js/86f62c57-5f9c-4eac-8a34-c9a6262bb9f7.jsonl: SyntaxError: Unexpected token 'u', \"uence\":nul\"... is not valid JSON\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:79\n at Array.map (<anonymous>)\n at hm (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:26)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:3878\n at async Promise.all (index 13)\n at async YPA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:3714)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:9601\n at async MI0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:203)\n at async dm2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:9099)","timestamp":"2025-12-16T07:23:28.147Z"},{"error":"Error: Error parsing line in /Users/<hidden>/.claude/projects/-Users-<hidden>-development-<hidden>-js/86f62c57-5f9c-4eac-8a34-c9a6262bb9f7.jsonl: SyntaxError: Unexpected token 'r', \"rt',\\n },\"... is not valid JSON\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:79\n at Array.map (<anonymous>)\n at hm (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:26)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:3878\n at async Promise.all (index 13)\n at async YPA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:3714)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:9601\n at async MI0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:203)\n at async dm2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4176:9099)","timestamp":"2025-12-16T07:23:28.147Z"},{"error":"Error: Error parsing line in /Users/<hidden>/.claude/projects/-Users-<hidden>-development-<hidden>-js/86f62c57-5f9c-4eac-8a34-c9a6262bb9f7.jsonl: SyntaxError: Unexpected non-whitespace character after JSON at position 12 (line 1 column 13)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:79\n at Array.map (<anonymous>)\n at hm (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:26)\n at async hZA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1125:3990)\n at async hl2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4765:294)","timestamp":"2025-12-16T07:23:29.236Z"},{"error":"Error: Error parsing line in /Users/<hidden>/.claude/projects/-Users-<hidden>-development-<hidden>-js/86f62c57-5f9c-4eac-8a34-c9a6262bb9f7.jsonl: SyntaxError: Unexpected token 'u', \"uence\":nul\"... is not valid JSON\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:79\n at Array.map (<anonymous>)\n at hm (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:26)\n at async hZA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1125:3990)\n at async hl2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4765:294)","timestamp":"2025-12-16T07:23:29.236Z"},{"error":"Error: Error parsing line
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗