[Bug] Anthropic API Error: Invalid message format with whitespace-only text content blocks
Resolved 💬 5 comments Opened Feb 4, 2026 by qa-aman Closed Mar 5, 2026
Bug Description
while doign my work in console in claude code, I got this error and now anything I am asking its showing this error in the console... just want to report this to claude team
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must contain
non-whitespace text"},"request_id":"req_011CXnabDZdAztkGLWEuPiFn"}
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.1.31
- Feedback ID: dd975f41-157e-421d-a9c9-9a21aebcc6d9
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/aman.parmar/.local/share/claude/versions/2.1.31 (expected in multi-process scenarios)\n at iYR (/$bunfs/root/claude:3621:2098)\n at cbA (/$bunfs/root/claude:3621:1209)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T05:54:10.128Z"},{"error":"AbortError: The operation was aborted.\n at unknown\n at abortChildProcess (node:child_process:935:42)\n at onAbortListener2 (node:child_process:35:24)\n at abort (unknown)\n at <anonymous> (/$bunfs/root/claude:3078:209)","timestamp":"2026-02-04T05:54:14.894Z"},{"error":"RipgrepTimeoutError: Ripgrep search timed out after 20 seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.\n at D (/$bunfs/root/claude:74:189)\n at <anonymous> (/$bunfs/root/claude:74:403)\n at exitHandler (node:child_process:109:27)\n at errorHandler (node:child_process:118:16)\n at emitError (node:events:43:23)\n at abortChildProcess (node:child_process:935:17)\n at onAbortListener2 (node:child_process:35:24)\n at abort (unknown)\n at <anonymous> (/$bunfs/root/claude:3078:209)","timestamp":"2026-02-04T05:54:14.894Z"},{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n at QD7 (/$bunfs/root/claude:807:4029)\n at async JD7 (/$bunfs/root/claude:807:1623)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T05:54:15.473Z"},{"error":"Error: Request was aborted.\n at zJR (/$bunfs/root/claude:1551:23586)\n at znB (/$bunfs/root/claude:5719:7546)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:48.095Z"},{"error":"Error: Request was aborted.\n at zJR (/$bunfs/root/claude:1551:23586)\n at znB (/$bunfs/root/claude:5719:7546)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:48.097Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/claude:361:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:48.100Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXnaCvNts8GfyVGWoUTEk\"}\n at generate (/$bunfs/root/claude:344:8698)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:55.544Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXnaCxKjDK9McjzMUzVXn\"}\n at generate (/$bunfs/root/claude:344:8698)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:55.992Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXnaCzF4vopByZjMsmJgN\"}\n at generate (/$bunfs/root/claude:344:8698)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:56.459Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXnaD2NZULRYPpShfPXju\"}\n at generate (/$bunfs/root/claude:344:8698)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T06:41:56.895Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXnaHdSobxNoNUXy6MUQL\"}\n at generate (/$bunfs/root/claude:344:8698)\n at makeRequest (/$bunfs/root/claude:361:5435…
Note: Content was truncated.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗