[BUG] ZstdDecompressionError printed to TUI when ztsd compressed connection is disconnected.

Resolved 💬 4 comments Opened Apr 15, 2026 by miniatureape Closed Apr 16, 2026

Preflight Checklist

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

What's Wrong?

While Claude is operating or during background tasks, if an MCP server is using ZTSD compression and disconnects mid stream, claude fails and prints the error message Decompression error: ZstdDecompressionError to the TUI breaking the user interface.

Debugging this with claude, the result is:

[DEBUG] MCP server "plugin:<RedactedPlugin>:data-concierge": Connection error: SSE stream disconnected:
  Error: ZstdDecompressionError fetching "https://ddr-<RedactedPlugin>mcp.dev.sp.<RedactedDomain>.com/mcp"

  ★ Insight ─────────────────────────────────────
  The <RedactedPlugin> MCP server uses Server-Sent Events (SSE) for its transport. The SSE HTTP response from ddr-<RedactedPlugin>mcp.dev.sp.<RedactedDomain>.com is served with Content-Encoding: zstd.
  Node.js's fetch API (bundled in the claude binary) decompresses it transparently — but when the long-lived SSE connection drops mid-stream, it's holding a partial Zstd frame that can't be
   completed, hence ZstdDecompressionError. This is a server-side issue: the <RedactedPlugin> MCP server should either use plain/gzip encoding for SSE, or the client should handle
  partial-frame disconnects gracefully.
  ─────────────────────────────────────────────────

  The culprit is the <RedactedPlugin> MCP server at ddr-<RedactedPlugin>mcp.dev.sp.<RedactedDomain>.com. Its SSE stream uses Zstd compression, and when the connection drops (which SSE connections do
  periodically), the partial compressed frame triggers the error.

  This is not something you can fix locally — it's a server-side or Claude Code client-side issue. Options:

  1. Short term: Disable the <RedactedPlugin> MCP server to stop the errors:
  # In /mcp, disable plugin:<RedactedPlugin>:data-concierge
  2. Report it: File at https://github.com/anthropics/claude-code/issues — Claude Code's SSE client should catch ZstdDecompressionError on disconnect and treat it as a clean reconnect
  rather than a visible error.

What Should Happen?

The errors should be handled and not printed to the TUI

Error Messages/Logs

See above.

Steps to Reproduce

Create an MCP server or plugin that uses ztsd compression. Disconnect it while claude is trying to read from it.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

iTerm2

Additional Information

<img width="1520" height="198" alt="Image" src="https://github.com/user-attachments/assets/fbf0b75c-3b27-47d0-bf93-3924bdcf7ecb" />

Error message can be seen here.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗