Bug Description
It is reading my files in the current folder. One pdf and a few markdown files, it stopped working and showed this error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.4: tool_use ids
were found without tool_result blocks immediately after: toolu_01LRM9xs9ZGG4pcrUhcobks4,
toolu_01LviFawtYc6VkX3LXTUQGqm. Each tool_use block must have a corresponding tool_result block in the next
message."}}
Environment Info
- Platform: linux
- Terminal: wsl-archlinux
- Version: 1.0.64
- Feedback ID: 22514987-f0c6-49ec-86d4-8259b159da01
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.4: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01LRM9xs9ZGG4pcrUhcobks4, toolu_01LviFawtYc6VkX3LXTUQGqm. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n at t4.generate (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1317:12486)\n at TP.makeStatusError (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n at TP.makeRequest (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async BfB.UF1.showErrors (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:14401)\n at async UF1 (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2490:5642)\n at async BfB (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:14252)\n at async file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:9308\n at async fM0 (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:1689)\n at async R11 (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:9278)","timestamp":"2025-07-31T08:55:40.569Z"}]
Bug Description
It is reading my files in the current folder. One pdf and a few markdown files, it stopped working and showed this error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.4:
tool_useidswere found without
tool_resultblocks immediately after: toolu_01LRM9xs9ZGG4pcrUhcobks4,toolu_01LviFawtYc6VkX3LXTUQGqm. Each
tool_useblock must have a correspondingtool_resultblock in the nextmessage."}}
Environment Info
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.4: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01LRM9xs9ZGG4pcrUhcobks4, toolu_01LviFawtYc6VkX3LXTUQGqm. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n at t4.generate (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1317:12486)\n at TP.makeStatusError (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n at TP.makeRequest (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async BfB.UF1.showErrors (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:14401)\n at async UF1 (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2490:5642)\n at async BfB (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:14252)\n at async file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:9308\n at async fM0 (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:1689)\n at async R11 (file:///home/zni/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2965:9278)","timestamp":"2025-07-31T08:55:40.569Z"}]