[Bug] SlashCommand Tool Execution Duplicates Command and Triggers API 400 Error

Resolved 💬 5 comments Opened Sep 30, 2025 by kylesnowschwartz Closed Dec 9, 2025

Bug Description
Using the SlashCommand tool is resulting in one of the user commands being run _twice_ and then returning an API Error: 400. I believe that the duplicate user command execution is why the result message is that tool_use ids were found without tool_result blocks immediately after.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.0.1
  • Feedback ID: 37e11724-c7dd-4ba5-92bf-8359f0647724

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.2: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01X3aVqJBgf9CCENfAgVPP9a. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTdtDCdsjrYbAAFwmzKMv\"}\n    at B4.generate (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:895:20956)\n    at yP.makeStatusError (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:2131)\n    at yP.makeRequest (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async cG1.model (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:39804)\n    at async cG1 (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:27733)\n    at async q2B (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:39958)\n    at async file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:34180\n    at async ZH0 (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:9568)\n    at async r11 (file:///Users/kyle/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:34150)","timestamp":"2025-09-30T03:34:50.562Z"}]

<img width="956" height="360" alt="Image" src="https://github.com/user-attachments/assets/4effb22a-8c35-4a04-8038-57c96ed55f53" />

View original on GitHub ↗

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