JSON Parsing Error: Invalid Low Surrogate in Request Body

Resolved 💬 16 comments Opened Jun 9, 2025 by yunqiqiliang Closed Aug 22, 2025

Bug Description
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 81796 (char 81795)"}}

请继续

⎿ 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 81759 (char 81758)"}}

/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 76767 (char 76766)"}}

Environment Info

  • Platform: macos
  • Terminal: vscode
  • Version: 1.0.17
  • Feedback ID: 2d09c7a9-c6e0-4647-9a20-f4f3804c4c49

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:890:11)\n    at execSync (node:child_process:962:15)\n    at YZ (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:654:3921)\n    at file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:11794\n    at Q (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:17190)\n    at cJ (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:10940)\n    at aP (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:10021)\n    at a6 (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:14133)","timestamp":"2025-06-09T04:04:14.727Z"},{"error":"Error: Command failed: security delete-generic-password -a $USER -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:890:11)\n    at execSync (node:child_process:962:15)\n    at YZ (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:654:3921)\n    at HfA (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:12906)\n    at KfA (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:12780)\n    at v1A (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2034:2569)\n    at g1A.startOAuthFlow (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2034:3705)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-09T04:04:34.727Z"},{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:890:11)\n    at execSync (node:child_process:962:15)\n    at YZ (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:654:3921)\n    at file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:11794\n    at Q (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:17190)\n    at cJ (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:10940)\n    at aP (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:10021)\n    at a6 (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:14133)","timestamp":"2025-06-09T04:04:34.797Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1573:1326)\n    at async iZ5 (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:19166)\n    at async WK1 (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:17752)\n    at async cZ5 (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:16794)\n    at async uZ5 (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:16423)\n    at async NO (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:15452)\n    at async NO (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:16278)\n    at async NO (file:///Users/liangmo/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1896:16

Note: Error logs were truncated.

View original on GitHub ↗

16 Comments

naren200 · 1 year ago
  ⎿ 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 226723 (char 
    226722)"}}

> **Prompt**?
  ⎿ 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 226723 (char 
    226722)"}}

> **Prompt**?
  ⎿ 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 226723 (char 
    226722)"}}

I'm getting the same erro

interior-night · 1 year ago

i've started getting this all the time. Also on macos, using the regular terminal.

oceandi · 1 year ago

!Image
me too

wennycooper · 1 year ago

me too :~

n0Sp00n · 1 year ago

I'm getting the same. So I guess Claude was vibe coded...

<img width="1208" height="380" alt="Image" src="https://github.com/user-attachments/assets/18a3c238-0380-4f38-91b2-8f94cf512778" />

<img width="1208" height="380" alt="Image" src="https://github.com/user-attachments/assets/911b3588-a695-4117-a021-bc10c853eaa9" />

siri666666 · 1 year ago

me too in win

gilsonherbst · 1 year ago

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 239091 (char 239090)"}}

How To fix this?

ramakay · 1 year ago

only way that works for me is to press esc go 3-4 messages back, i manually copy the previous lines upto the esc so it doesn't lose context of the forward converesation.

jaspergreen · 12 months ago

Same here, I think it the .claude.json file that gets corrupted line 1 column 239091 (char 239090)"}} is from that file, it gets really big and sometimes corrupted, when if you run a /clear command it deletes full history for that repo but at least it will work again. You could ask claude code to open claude.json and see what the issue is on that line :-)

n0Sp00n · 12 months ago

Probably Claude was vibe-coded :)

On Thu, Jul 17, 2025 at 10:59 AM jaspergreen @.***>
wrote:

jaspergreen left a comment (anthropics/claude-code#1832) <https://github.com/anthropics/claude-code/issues/1832#issuecomment-3083026628> Same here, I think it the .claude.json file that gets corrupted line 1 column 239091 (char 239090)"}} is from that file, it get really big and sometimes corrupted, when if you run a /clear command it deletes full history for that repo but at least it will work again. You could as claude code to open claude.json and see what the issue is on that line :-) — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/1832#issuecomment-3083026628>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4TY46EOGNF7HU4XBB4VX33I5JVTAVCNFSM6AAAAAB64KC47CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAOBTGAZDMNRSHA> . You are receiving this because you commented.Message ID: @.***>

--
Kind regards,
Tsvetan Dimitrov
https://calendly.com/dimitrovovich

olbo22 · 11 months ago

any updates to that error?

Atsumi3 · 11 months ago

same

tientv · 11 months ago

same here, using max plan

n0Sp00n · 11 months ago

Anthropic's has to start hiring real engineers and not vibe coders.

Kind regards,
Tsvetan Dimitrov
https://calendly.com/dimitrovovich

On Mon, 28 Jul 2025 at 11:58, TienTran @.***> wrote:

tientv left a comment (anthropics/claude-code#1832) <https://github.com/anthropics/claude-code/issues/1832#issuecomment-3126474749> same here, using max plan — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/1832#issuecomment-3126474749>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4TY44ALYQ7JZ4HDAEFXWD3KXX4JAVCNFSM6AAAAAB64KC47CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMRWGQ3TINZUHE> . You are receiving this because you commented.Message ID: @.***>
timobehrens · 11 months ago

same here

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.