Skip to content

Missing Tool Result Block for Tool Use ID toolu_01EPeY4jhznE8ipJCLiFTXiP #4563

@hunarjain09

Description

@hunarjain09

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

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.61
  • Feedback ID: a286a920-dd83-476f-b607-e2904e5fbd5a

Errors

[{"error":"MaxFileReadTokenExceededError: File content (41425 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at O98 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1428:432)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1423:6367)\n    at async KX8 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2428:10150)\n    at async hb1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2428:6569)","timestamp":"2025-07-28T01:12:34.148Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.8: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01EPeY4jhznE8ipJCLiFTXiP. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at i4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:7796)\n    at DP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n    at DP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async UvB.kG1.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:14365)\n    at async kG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2345:5642)\n    at async UvB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:14216)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:9271\n    at async bL0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:1690)\n    at async ne (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:9241)","timestamp":"2025-07-28T01:12:35.438Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.8: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01EPeY4jhznE8ipJCLiFTXiP. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at i4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:7796)\n    at DP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n    at DP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async UvB.kG1.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:14365)\n    at async kG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2345:5642)\n    at async UvB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:14216)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:9271\n    at async bL0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:1690)\n    at async ne (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:9241)","timestamp":"2025-07-28T01:13:01.650Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.8: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01EPeY4jhznE8ipJCLiFTXiP. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at i4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:7796)\n    at DP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n    at DP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async UvB.kG1.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2902:14365)\n    at async kG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2345:5642)\n    at async UvB (file:///opt/homebrew/lib/node_modules/@ant

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