[Bug] Anthropic API Error: Invalid JSON Request Body

Resolved 💬 3 comments Opened Sep 25, 2025 by Electro-Jam Closed Sep 28, 2025

Bug Description
I keep running into this error and I don't hink it is anything I am donig... so I don't know how to keep working and making progress when this happens... not sure how to restart, how to get around this or how to proceed as this happened in the middle of doing work that needs to complete...

Hope the error message helps.
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"The request body is not valid JSON: no low
surrogate in string: line 1 column 604829 (char 604828)"},"request_id":"req_011CTUS3iTAMwrzdkP5U5K3i"}

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 1.0.123
  • Feedback ID: 51e04dbd-c572-43e5-918e-217a6f1dae16

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: no low surrogate in string: line 1 column 604829 (char 604828)\"},\"request_id\":\"req_011CTUS2EmVnPZkrRGE1Tk9K\"}\n    at a9.generate (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:977:2412)\n    at AP.makeStatusError (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:994:2131)\n    at AP.makeRequest (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:994:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async XQB.ZY1.showErrors (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:33388)\n    at async ZY1 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:21632)\n    at async XQB (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:33215)\n    at async file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:27984\n    at async fH0 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:4362)\n    at async K01 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:27954)","timestamp":"2025-09-25T03:46:04.478Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: no low surrogate in string: line 1 column 604829 (char 604828)\"},\"request_id\":\"req_011CTUS3iTAMwrzdkP5U5K3i\"}\n    at a9.generate (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:977:2412)\n    at AP.makeStatusError (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:994:2131)\n    at AP.makeRequest (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:994:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async XQB.ZY1.showErrors (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:33388)\n    at async ZY1 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:21632)\n    at async XQB (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:33215)\n    at async file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:27984\n    at async fH0 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:4362)\n    at async K01 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1919:27954)","timestamp":"2025-09-25T03:46:24.474Z"}]

View original on GitHub ↗

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