claude-code - 💡(How to fix) Fix [BUG] Dispatch API Error: 400 [1 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#56062Fetched 2026-05-05 05:59:11
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

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 295204 (char 295203)”},“request_id”:“req_011CahoftjanfvWauQNnAfto”}

Fix Action

Fix / Workaround

Any message I send in dispatch shows the error attached. I am using Claude max. I have debugged and troubleshot with Ai and Claude code.

Dispatch should respond appropriately

Sending a message to dispatch

Code Example

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 295204 (char 295203)},“request_id”:“req_011CahoftjanfvWauQNnAfto”}
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?

Any message I send in dispatch shows the error attached. I am using Claude max. I have debugged and troubleshot with Ai and Claude code.

<img width="1320" height="2868" alt="Image" src="https://github.com/user-attachments/assets/d1f38780-fd17-4a47-afdd-d384574381d2" />

What Should Happen?

Dispatch should respond appropriately

Error Messages/Logs

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 295204 (char 295203)},“request_id”:“req_011CahoftjanfvWauQNnAfto”}

Steps to Reproduce

Sending a message to dispatch

<img width="1320" height="2868" alt="Image" src="https://github.com/user-attachments/assets/f272a132-ed61-4e64-a7a9-ae923b825e17" />

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.5354.0

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Claude desktop dispatch is stuck

extent analysis

TL;DR

The issue is likely due to invalid JSON in the request body, causing a 400 error, and can be fixed by ensuring the request body is valid JSON.

Guidance

  • Verify that the request body being sent to the API is valid JSON, checking for any special characters or encoding issues that may be causing the "invalid high surrogate in string" error.
  • Review the code that constructs the request body to ensure it is properly encoding any special characters or non-ASCII text.
  • Check the API documentation to see if there are any specific requirements for request body formatting or encoding.
  • Test the request with a simplified payload to isolate the issue and identify the specific character or string causing the error.

Example

No code example is provided as the issue does not include specific code snippets, but the error message suggests focusing on JSON encoding and special character handling.

Notes

The issue may be related to the specific Claude model or version being used, but without more information, it's difficult to determine the root cause. The error message suggests a JSON encoding issue, which should be the primary focus for debugging.

Recommendation

Apply workaround: Ensure the request body is valid JSON and properly encoded to fix the 400 error, as the root cause appears to be related to JSON formatting rather than a version-specific issue.

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] Dispatch API Error: 400 [1 participants]