[Bug] Invalid high surrogate in JSON still occurring on Windows - v2.1.76
Resolved 💬 3 comments Opened Mar 16, 2026 by pedrokschneider Closed Mar 20, 2026
Bug Description
API Error: 400 with invalid high surrogate in string still occurring on Windows with Claude Code v2.1.76. This bug has been reported multiple times (#5761, #9586, #6203, #4599, #3276, #2311, #1762) and marked as duplicate/closed, but it persists in the latest version.
The error occurs when Claude Code reads files containing Unicode characters (emoji, special characters copied from external sources). The JSON serializer produces lone surrogate pairs that the API rejects.
Error Message
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 96770 (char 96769)"},"request_id":"req_011CZ6oNKuJj8QT9PVqzt6NL"}
Investigation Details
- Verified all local config files (skills, agents, commands, CLAUDE.md) contain valid UTF-8
- Found 24 files with emoji in filenames (🏠, 📖, 💬, etc.) in the workspace, but these are valid UTF-8
- The issue appears to be in Claude Code's JSON serialization layer on Windows, not in the source files themselves
- Error happens specifically when reading files that contain characters copied from external sources
Environment Info
- Platform: Windows 11 Pro (win32) 10.0.26200
- Version: 2.1.76
- Shell: bash
- Trigger: Reading files with Unicode content (emoji, special characters)
Previous Related Issues
- #5761 (closed as duplicate)
- #9586 (closed as duplicate of #5761)
- #6203, #4599, #3276, #2311, #1762 (all closed)
This is a recurring issue that has not been fully resolved. Please consider reopening investigation.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗