claude-code - 💡(How to fix) Fix [BUG] Persistent "Expecting value: line 1 column 1 (char 0)" JSON parse error after tool execution

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

After any successful tool execution (specifically MCP tools like Playwright browser automation), the CLI injects a JSON parse error into assistant The tool itself executes successfully, but immediately after completion, this error appears and interrupts the response. This happens consistently with The error appears to be a client-side JSON parsing failure where an empty or malformed API response is being parsed, causing the error text to be injected Tool execution log showing successful completion followed by error: [THEN ERROR APPEARS IMMEDIATELY AFTER]

Error Messages/Logs

  1. Immediately after tool success, error appears: "Expecting value: line 1 column 1 (char 0) (request_id=req_...)"
  • Error persists after full Claude Code restart
  • Error persists after disabling all non-essential plugins and MCP servers
  • Error occurs with official Playwright plugin only (no third-party plugins enabled)
  • Tool execution itself succeeds - error occurs during response parsing/processing
  • The error format "Expecting value: line 1 column 1 (char 0)" is a Python JSON parser error, suggesting the Claude Code client is failing to parse an empty HTTP response body

Code Example

await page.goto('https://example.com');
  Page

  - Page URL: https://example.com/
  - Page Title: Example Domain
  [THEN ERROR APPEARS IMMEDIATELY AFTER]

### Error Messages/Logs
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?

After any successful tool execution (specifically MCP tools like Playwright browser automation), the CLI injects a JSON parse error into assistant responses:

"Expecting value: line 1 column 1 (char 0) (request_id=req_XXXXX)"

The tool itself executes successfully, but immediately after completion, this error appears and interrupts the response. This happens consistently with Playwright tools but may affect other MCP tools as well.

The error appears to be a client-side JSON parsing failure where an empty or malformed API response is being parsed, causing the error text to be injected into the assistant's output stream.

What Should Happen?

After successful tool execution, the assistant should complete its response without injecting JSON parse errors. Tool results should be processed cleanly without corrupting the response stream.

Tool execution log showing successful completion followed by error:

Ran Playwright code

await page.goto('https://example.com');
Page

- Page URL: https://example.com/
- Page Title: Example Domain
[THEN ERROR APPEARS IMMEDIATELY AFTER]

### Error Messages/Logs

```shell
Expecting value: line 1 column 1 (char 0) (request_id=req_754524cfbda8)
Expecting value: line 1 column 1 (char 0) (request_id=req_e07057cbf207)
Expecting value: line 1 column 1 (char 0) (request_id=req_9df7341b3283)
Expecting value: line 1 column 1 (char 0) (request_id=req_45ae32b15adb)
Expecting value: line 1 column 1 (char 0) (request_id=req_d6de75d3303e)
Expecting value: line 1 column 1 (char 0) (request_id=req_879851383362)

Steps to Reproduce

  1. Enable Playwright plugin: playwright@claude-plugins-official
  2. Enable Playwright MCP server: plugin:playwright:playwright
  3. Run any Playwright browser command, e.g., navigate to a URL
  4. Tool executes successfully (page loads, actions complete)
  5. Immediately after tool success, error appears: "Expecting value: line 1 column 1 (char 0) (request_id=req_...)"

Note: The bug appears to be triggered by MCP tool responses. The tool itself succeeds, but the JSON parsing of the response fails somewhere in the client/API layer. Multiple different request IDs are generated, suggesting each tool call produces a new failure

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.153

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

  • Error persists after full Claude Code restart
  • Error persists after disabling all non-essential plugins and MCP servers
  • Error occurs with official Playwright plugin only (no third-party plugins enabled)
  • Tool execution itself succeeds - error occurs during response parsing/processing
  • Each occurrence has a unique request_id, suggesting failed API responses
  • Errors appear in session log files: .claude/projects/C--Users-Dell/*.jsonl
  • The error format "Expecting value: line 1 column 1 (char 0)" is a Python JSON parser error, suggesting the Claude Code client is failing to parse an empty HTTP response body

This appears to be a bug in the Claude Code client's handling of MCP server responses or API response parsing, not a plugin 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