[Bug] Anthropic API Error: Invalid JSON Surrogate in Request Body
Bug Description
Bash(go test -v ./clients/titan/consumption/data -run "Test.Consumption." -timeout 60s)
⎿ 2025-09-24T08:43:47+01:00 INFO 📺 Using default TV device MCU database path: /mtd_rwarea/mcul/Db
2025-09-24T08:43:47+01:00 INFO 📺 Using default TV device channel database path: /mtd_rwarea/HbbtvChannelData.db3
=== RUN TestAppConsumptionsBugFix
… +349 lines (ctrl+o to expand)
⎿ 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 403992 (char 403991)"},"request_id":"req_011CTSrMqvAY2Vw4pZxbxQ9P"}
/exit
⎿ Catch you later!
run all tests and corry on
⎿ 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 372504 (char 372503)"},"request_id":"req_011CTSrRzKYk1XTorLbHcgs2"}
/compact
⎿ Error: Error during compaction: Error: 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 332336 (char 332335)"},"request_id":"req_011CTSrSegswyb4BRSPPm6Rg"}
Environment Info
- Platform: darwin
- Terminal: goland
- Version: 1.0.123
- Feedback ID: 38d6c360-5853-42b6-8041-4a2c5643d05a
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 372504 (char 372503)\"},\"request_id\":\"req_011CTSrRzKYk1XTorLbHcgs2\"}\n at a9.generate (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:977:2412)\n at AP.makeStatusError (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:994:2131)\n at AP.makeRequest (file:///Users/johnharrison/.claude/local/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:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:33388)\n at async ZY1 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:21632)\n at async XQB (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:33215)\n at async file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:27984\n at async fH0 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:4362)\n at async K01 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:27954)","timestamp":"2025-09-24T07:44:58.254Z"},{"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 332336 (char 332335)\"},\"request_id\":\"req_011CTSrSegswyb4BRSPPm6Rg\"}\n at a9.generate (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:977:2412)\n at AP.makeStatusError (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:994:2131)\n at AP.makeRequest (file:///Users/johnharrison/.claude/local/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:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:33388)\n at async ZY1 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:21632)\n at async XQB (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:33215)\n at async file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:27984\n at async fH0 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:4362)\n at async K01 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1919:27954)","timestamp":"2025-09-24T07:45:07.222Z"},{"error":"Error: 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 332336 (char 332335)\"},\"request_id\":\"req_011CTSrSegswyb4BRSPPm6Rg\"}\n at px1 (file:///Users/johnharrison/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2214:1443)\n at process.processTicksAndRejections (node:internal/process/task_queues
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗