Invalid JSON Encoding in Large Markdown File
Bug Description
when trying to update a file in th eproject with the current status, I get the error below. I've tried converting the file to different format, to remove the invalid character, but still get the same error. The other thing, the file is 45K long, the error location is way beyond the end of the file.
update @Docs\langgraph-update.md with the progress so far
⎿ Read Docs\langgraph-update.md (834 lines)
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"The request body is not valid JSON: invalid high
surrogate in string: line 1 column 638684 (char 638683)"},"request_id":"req_011CSMoCEjVTB7Eg73wCkZ7Y"}
Environment Info
- Platform: win32
- Terminal: vscode
- Version: 1.0.86
- Feedback ID: 1e1e71ab-7a07-4768-bf0a-1aa31c8fff8b
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: invalid high surrogate in string: line 1 column 638684 (char 638683)\"},\"request_id\":\"req_011CSMkD59U26cm2WE6pDLeZ\"}\n at b4.generate (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:932:2412)\n at dP.makeStatusError (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n at dP.makeRequest (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async LD1.showErrors (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:27238)\n at async LD1 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:16345)\n at async l9B (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:27089)\n at async file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:22183\n at async dH0 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:3514)\n at async V11 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:22153)","timestamp":"2025-08-21T23:45:59.090Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: invalid high surrogate in string: line 1 column 638684 (char 638683)\"},\"request_id\":\"req_011CSMkhJST9HqPqDCfzzy7X\"}\n at b4.generate (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:932:2412)\n at dP.makeStatusError (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n at dP.makeRequest (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async LD1.showErrors (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:27238)\n at async LD1 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:16345)\n at async l9B (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:27089)\n at async file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:22183\n at async dH0 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:3514)\n at async V11 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:22153)","timestamp":"2025-08-21T23:52:22.034Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: invalid high surrogate in string: line 1 column 638684 (char 638683)\"},\"request_id\":\"req_011CSMmGM393CYK6MzYzhFWB\"}\n at b4.generate (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:932:2412)\n at dP.makeStatusError (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n at dP.makeRequest (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async LD1.showErrors (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:27238)\n at async LD1 (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:16345)\n at async l9B (file:///C:/Users/gazza/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1904:27089)\n at async file:///C:/Users/gazza/AppDa
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗