[Bug] Anthropic API Error: Text content blocks contain only whitespace

Resolved 💬 5 comments Opened Feb 4, 2026 by briannorris2 Closed Mar 5, 2026

Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must contain non-whitespace text"},"request_id":"req_011CXoYqAD7yZNpbDsKDXYVm"}

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.1.31
  • Feedback ID: fba03a58-b6d5-4995-a8ee-5568cee0bed0

Errors

[{"error":"Error: LSP server plugin:typescript-lsp:typescript failed to start: spawn typescript-language-server ENOENT\n    at Object.start (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:22365)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Object.O [as start] (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:24797)","timestamp":"2026-02-04T19:04:20.231Z"},{"error":"Error: LSP server plugin:pyright-lsp:pyright failed to start: spawn pyright-langserver ENOENT\n    at Object.start (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:22365)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Object.O [as start] (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:24797)","timestamp":"2026-02-04T19:04:20.232Z"},{"error":"Error: spawn typescript-language-server ENOENT\n    at ChildProcess._handle.onexit (node:internal/child_process:285:19)\n    at onErrorNT (node:internal/child_process:483:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)","timestamp":"2026-02-04T19:04:20.232Z"},{"error":"Error: spawn pyright-langserver ENOENT\n    at ChildProcess._handle.onexit (node:internal/child_process:285:19)\n    at onErrorNT (node:internal/child_process:483:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)","timestamp":"2026-02-04T19:04:20.232Z"},{"error":"Error: Failed to start LSP server plugin:typescript-lsp:typescript: spawn typescript-language-server ENOENT\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:32575\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)","timestamp":"2026-02-04T19:04:20.232Z"},{"error":"Error: Failed to start LSP server plugin:pyright-lsp:pyright: spawn pyright-langserver ENOENT\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:32575\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)","timestamp":"2026-02-04T19:04:20.232Z"},{"error":"Error: LSP server plugin:rust-analyzer-lsp:rust-analyzer crashed with exit code 1\n    at ChildProcess.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2247:21522)\n    at ChildProcess.emit (node:events:508:28)\n    at ChildProcess._handle.onexit (node:internal/child_process:293:12)","timestamp":"2026-02-04T19:04:20.825Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXoYqAD7yZNpbDsKDXYVm\"}\n    at g4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:405:8663)\n    at _C.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:422:2195)\n    at _C.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:422:5420)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)","timestamp":"2026-02-04T19:04:28.990Z"}]

View original on GitHub ↗

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