[Bug] Anthropic API Error: Missing Tool Result Block

Resolved 💬 8 comments Opened Sep 28, 2025 by fwends Closed Jan 6, 2026

Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.175: tool_use ids
were found without tool_result blocks immediately after: toolu_015g5zBhDygcYYzT5aZSbDfA. Each tool_use block
must have a corresponding tool_result block in the next message."},"request_id":"req_011CTbfG97rqTEntBzgaFmng"}

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.128
  • Feedback ID: a094b15c-87a7-4ae4-9c50-6a85aaba8e15

Errors

[{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:433:20)\n    at Object.readFileSync (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:719:16544)\n    at lBB (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3607:659)\n    at Object.call (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1712:952)\n    at call.next (<anonymous>)\n    at BO (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1163:30556)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1790:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-28T12:33:59.661Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:433:20)\n    at Object.readFileSync (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:719:16544)\n    at lBB (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3607:659)\n    at Object.call (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1712:952)\n    at call.next (<anonymous>)\n    at BO (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1163:30556)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1790:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-28T12:33:59.693Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:433:20)\n    at Object.readFileSync (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:719:16544)\n    at lBB (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3607:659)\n    at Object.call (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1712:952)\n    at call.next (<anonymous>)\n    at BO (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1163:30556)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1790:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-28T12:33:59.710Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at AK (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:1183)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:911\n    at Array.map (<anonymous>)\n    at WJ (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:902)\n    at bJB (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2912:9380)\n    at KC (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n    at Mp (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n    at V9 (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n    at jh (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n    at LC (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)","timestamp":"2025-09-28T12:47:21.936Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at AK (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:1183)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:2175\n    at Array.map (<anonymous>)\n    at AK (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:2146)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:2062\n    at Array.map (<anonymous>)\n    at AK (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:2051)\n    at file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:911\n    at Array.map (<anonymous>)\n    at WJ (file:///Users/greg/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1774:902)","timestamp":"2025-09-28T12:50:04.780Z"},{"error":"Error: Language not supported while highligh

Note: Error logs were truncated.

View original on GitHub ↗

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