Skip to content

Missing Tool Result Block for Tool Use ID toolu_014WRYo8UVyByXERm9NJLUir #2796

@jhoe123

Description

@jhoe123

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

Environment Info

  • Platform: linux
  • Terminal: wsl-Ubuntu-20.04
  • Version: 1.0.33
  • Feedback ID: c3751a9e-c045-443f-b221-aa920c50c84e

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/mnt/c/Users/Jhoemar/Documents/Projects/corp1/api/CyberONE.Any/LogicTests/Utils'\n    at Module.readdirSync (node:fs:1562:26)\n    at Object.readdirSync (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:536:1562)\n    at XC6 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1415:721)\n    at Object.call (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1415:148)\n    at call.next (<anonymous>)\n    at mX6 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1899:25196)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async cE1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1899:23352)\n    at async hE1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1893:775)\n    at async uX6 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1899:22496)","timestamp":"2025-07-01T08:18:28.281Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.108: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_014WRYo8UVyByXERm9NJLUir. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at cQ.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1302:12578)\n    at mz.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:2082)\n    at mz.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MN2.c11.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22444)\n    at async c11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:12346)\n    at async MN2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22290)\n    at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17419\n    at async le1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:5121)\n    at async Sd (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17389)","timestamp":"2025-07-01T12:38:21.007Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.108: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_014WRYo8UVyByXERm9NJLUir. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at cQ.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1302:12578)\n    at mz.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:2082)\n    at mz.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MN2.c11.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22444)\n    at async c11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:12346)\n    at async MN2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22290)\n    at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17419\n    at async le1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:5121)\n    at async Sd (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17389)","timestamp":"2025-07-01T12:38:46.953Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at AT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1613:546)\n    at fe1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1613:104)\n    at Object.renderToolUseRejectedMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1623:3404)\n    at xM2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1926:2844)\n    at iU (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:80:19803)\n    at DP (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:42555)\n    at

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions