Invalid API Request: Empty Message Content Violation
Resolved 💬 1 comment Opened Jul 23, 2025 by D36u99er Closed Jul 25, 2025
Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error",
"message":"messages.207: all messages must have non-empty content
except for the optional final assistant message"}}
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.58
- Feedback ID: 9a774caf-72ed-46f7-b907-9f33d949eb1b
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:882:11)\n at execSync (node:child_process:954:15)\n at F7 (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:844:5958)\n at file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:756:48658\n at Q (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:653:14408)\n at LW (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:756:46369)\n at eK (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:756:45236)\n at dB (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:756:51284)","timestamp":"2025-07-23T16:24:57.354Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:481: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-23T16:24:57.654Z"},{"error":"Error: Invalid URL\n at POB (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2465:3976)\n at Object.call (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2465:7959)\n at call.next (<anonymous>)\n at $98 (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2340:9792)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async wk1 (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2340:6455)\n at async Ho (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:1737:1383)\n at async w98 (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2340:5600)\n at async z98 (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2340:5085)\n at async dU (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2340:3537)","timestamp":"2025-07-23T16:37:19.074Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.207: all messages must have non-empty content except for the optional final assistant message\"}}\n at S4.generate (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:1296:6428)\n at HO.makeStatusError (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:1313:2101)\n at HO.makeRequest (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:1313:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async YPB.A71.showErrors (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2724:14297)\n at async A71 (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2257:2500)\n at async YPB (file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropic-ai/claude-code/cli.js:2724:14148)\n at async file:///Users/hahaha/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.58/node_modules/@anthropi
Note: Error logs were truncated.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗