claude-code - 💡(How to fix) Fix Claude code web: 400 "Invalid high surrogate" on every message, persists across new sessions, repo is clean.

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…

Error Message

API Error: 400 The request body is not valid JSON: invalid high surrogate in string: line 1 column 3120 (char 3119)

Code Example

API Error: 400 The request body is not valid JSON: invalid high surrogate in string: line 1 column 3120 (char 3119)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Every message in any new session on my repo returns: API Error: 400 The request body is not valid JSON: invalid high surrogate in string: line 1 column 3170 (char 3169)

Started after copy-pasting text between two separate account browser sessions (two accounts on same repo). Entire repo scanned programmatically — 337 files, zero lone surrogates found. New sessions also fail immediately on first message.

What Should Happen?

Sessions on this repo should work normally. Typing any message should not produce a 400 error.

Error Messages/Logs

API Error: 400 The request body is not valid JSON: invalid high surrogate in string: line 1 column 3120 (char 3119)

Steps to Reproduce

  1. Open Claude Code web on repo GGGP-Test/warlord-platform
  2. Start a new session
  3. Type any message (even "hello")
  4. Error appears immediately

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

web (claude.ai/code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Using Claude Code on the web, not CLI. Two accounts both push to same repo. Bad character introduced via cross-account copy-paste, but repo is now fully clean.

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