claude-code - 💡(How to fix) Fix [Bug] Anthropic API Error: Invalid JSON - malformed surrogate in request body [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46717Fetched 2026-04-12 13:34:54
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×5closed ×1commented ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/feng/.local/share/claude/versions/2.1.101 (expected in multi-process scenarios)\n at Oc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n at Ve6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:48.484Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: unknown certificate verification error\n at VU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:49.905Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: unknown certificate verification error\n at VU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:49.906Z"},{"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 755115 (char 755114)"},"request_id":"req_011CZxLsLJE499MkFWSf5X43"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:53430)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:52.850Z"}]

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/feng/.local/share/claude/versions/2.1.101 (expected in multi-process scenarios)\n    at Oc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n    at Ve6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:48.484Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: unknown certificate verification error\n    at VU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:49.905Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: unknown certificate verification error\n    at VU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:49.906Z"},{"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 755115 (char 755114)\"},\"request_id\":\"req_011CZxLsLJE499MkFWSf5X43\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:53430)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:52.850Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description session broken with such an error

我已经把 netskope 关掉了 ⎿  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 755115 (char 755114)"},"request_id":"req_011CZxLhDCoWDPfTJaeGeagn"}

❯ test ⎿  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 755115 (char 755114)"},"request_id":"req_011CZxLkLXBEoMSooX9341bE"}

❯ test ⎿  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 755115 (char 755114)"},"request_id":"req_011CZxLmfQzxmTnhQa9zemJB"}

❯ test ⎿  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 755115 (char 755114)"},"request_id":"req_011CZxLnzrpPGDrGpRJqF1Er"}

❯ test ⎿  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 755115 (char 755114)"},"request_id":"req_011CZxLsLJE499MkFWSf5X43"}

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.101
  • Feedback ID: 5b98bccc-a7b5-4a22-acb6-cdc727532298

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/feng/.local/share/claude/versions/2.1.101 (expected in multi-process scenarios)\n    at Oc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n    at Ve6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:48.484Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: unknown certificate verification error\n    at VU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:49.905Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: unknown certificate verification error\n    at VU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:49.906Z"},{"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 755115 (char 755114)\"},\"request_id\":\"req_011CZxLsLJE499MkFWSf5X43\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:53430)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T17:01:52.850Z"}]

extent analysis

TL;DR

The issue is likely caused by invalid JSON in the request body, and checking the request data for proper JSON formatting may resolve the issue.

Guidance

  • Verify that the request body is valid JSON, focusing on the area around line 1, column 755115, where the error is reported.
  • Check for any special characters or encoding issues that might be causing the JSON to be invalid.
  • Review the code that generates the request body to ensure it is properly formatting the JSON data.
  • Consider using a JSON validation tool or library to help identify and fix any issues with the request body.

Example

No specific code example can be provided without more context, but using a JSON validation function, such as JSON.parse() in JavaScript, can help identify if the request body is valid JSON.

Notes

The provided error messages indicate a problem with the request body being invalid JSON, but without more information about how the request body is generated, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround by validating and fixing the JSON data in the request body, as this is the most direct way to address the reported error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Anthropic API Error: Invalid JSON - malformed surrogate in request body [1 comments, 2 participants]