claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Missing Tool Result Block for Tool Use ID

Open shimscho opened this issue 1 year ago • 3 comments

Bug Description after doing some endpoint testing with swagger I amo getting an error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.90: tool_use ids were found without tool_result blocks immediately after: toolu_01GJYCVNjYJ6Wq9fd5Jub5vJ. Each tool_use block must have a corresponding tool_result block in the next message."}}

/compact ⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.90: tool_use ids were found without tool_result blocks immediately after: toolu_01GJYCVNjYJ6Wq9fd5Jub5vJ. Each tool_use block must have a corresponding tool_result block in the next message."}}

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 1.0.35
  • Feedback ID: 9d56e0c7-a321-45b7-a1ac-430f18f51f6e

Errors

[{"error":"Error: String not found in file. Failed to apply edit.\n    at sO (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1610:728)\n    at Object.call (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:2277)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async eC5 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:25091)\n    at async eH1 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:23247)\n    at async oC5 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:22271)\n    at async sC5 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:21900)\n    at async eO (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:21028)\n    at async eO (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:21751)\n    at async eO (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1896:21751)","timestamp":"2025-06-26T13:20:15.808Z"},{"error":"Error: Command failed: /home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg -Uli --multiline-dotall loadRecentDocuments|slice --glob admin-dashboard.js /home/scs/projects/Assixx/frontend/src/js\nrg: /home/scs/projects/Assixx/frontend/src/js: IO error for operation on /home/scs/projects/Assixx/frontend/src/js: No such file or directory (os error 2)\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at ChildProcess.exithandler (node:child_process:414:12)\n    at ChildProcess.emit (node:events:518:28)\n    at ChildProcess.emit (node:domain:489:12)\n    at maybeClose (node:internal/child_process:1101:16)\n    at Socket.<anonymous> (node:internal/child_process:456:11)\n    at Socket.emit (node:events:518:28)\n    at Socket.emit (node:domain:489:12)\n    at Pipe.<anonymous> (node:net:351:12)","timestamp":"2025-06-26T15:56:32.927Z"},{"error":"Error: Request was aborted.\n    at Jq.makeRequest (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1314:3838)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-26T16:02:49.015Z"},{"error":"Error: Request was aborted.\n    at Vt._createMessage (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1305:7931)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-26T17:58:30.817Z"},{"error":"Error: Compaction canceled.\n    at Object.call (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1993:931)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async YO5 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2469:58)\n    at async kp (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2465:21090)\n    at async file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2470:4925","timestamp":"2025-06-26T17:58:30.876Z"},{"error":"Error: Error opening file /home/scs/.claude/projects/-home-scs-projects-Assixx/e41be086-51fb-421c-a613-0b42f8dc3d6d.jsonl: Error: ENOENT: no such file or directory, open '/home/scs/.claude/projects/-home-scs-projects-Assixx/e41be086-51fb-421c-a613-0b42f8dc3d6d.jsonl'\n    at DB1 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:176)\n    at async Kf1 (file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:624:2813)\n    at async file:///home/scs/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claud

Note: Error logs were truncated.

shimscho avatar Jun 26 '25 18:06 shimscho

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5662
  2. https://github.com/anthropics/claude-code/issues/3003
  3. https://github.com/anthropics/claude-code/issues/5705

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 16 '25 06:08 github-actions[bot]

This issue has been automatically closed as a duplicate of #5662.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 21 '25 09:08 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 29 '25 14:08 github-actions[bot]