Bug Description
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_016V22G6g4bAjj63qYouNsy5. Each tool_use block must have a corresponding tool_result
block in the next message."}} i get this every time i message the agent!
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.63
- Feedback ID: 84434e5b-1737-4943-b414-d4f9893f6a06
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:892:11)\n at execSync (node:child_process:964:15)\n at p7 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:865:5108)\n at file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:48959\n at Q (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:674:14420)\n at kJ (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:46397)\n at XH (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:45264)\n at Y9 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:51585)","timestamp":"2025-07-30T19:55:18.959Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:482:14)\n at Socket.emit (node:events:507:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:559:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)\n at Readable.push (node:internal/streams/readable:390:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-07-30T19:55:20.451Z"},{"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_016V22G6g4bAjj63qYouNsy5. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n at i4.generate (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:1317:12488)\n at YP.makeStatusError (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n at YP.makeRequest (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async SvB.dG1.showErrors (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:14365)\n at async dG1 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2485:5642)\n at async SvB (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:14216)\n at async file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:9271\n at async hL0 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:1690)\n at async ee (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:9241)","timestamp":"2025-07-30T19:56:29.861Z"}]
Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.4:
tool_useids were found withouttool_resultblocks immediately after:toolu_016V22G6g4bAjj63qYouNsy5. Each
tool_useblock must have a correspondingtool_resultblock in the next message."}} i get this every time i message the agent!
Environment Info
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:892:11)\n at execSync (node:child_process:964:15)\n at p7 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:865:5108)\n at file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:48959\n at Q (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:674:14420)\n at kJ (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:46397)\n at XH (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:45264)\n at Y9 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:776:51585)","timestamp":"2025-07-30T19:55:18.959Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:482:14)\n at Socket.emit (node:events:507:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:559:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)\n at Readable.push (node:internal/streams/readable:390:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-07-30T19:55:20.451Z"},{"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_016V22G6g4bAjj63qYouNsy5. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n at i4.generate (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:1317:12488)\n at YP.makeStatusError (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:1334:2101)\n at YP.makeRequest (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:1334:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async SvB.dG1.showErrors (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:14365)\n at async dG1 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2485:5642)\n at async SvB (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:14216)\n at async file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:9271\n at async hL0 (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:1690)\n at async ee (file:///Users/drew/node_modules/@anthropic-ai/claude-code/cli.js:2960:9241)","timestamp":"2025-07-30T19:56:29.861Z"}]