[BUG] Mismatched content block type content_block_delta text - Frequent session interruptions in VSCode extension

Resolved 💬 3 comments Opened Apr 8, 2026 by liaozhaoyan Closed Apr 11, 2026

Environment

  • Extension: Claude Code for VS Code (latest version)
  • Platform: macOS Darwin 25.3.0
  • Architecture: Apple Silicon (darwin-arm64)
  • VS Code: Latest version
  • Model: Claude Sonnet 4.6

Bug Description

I'm experiencing frequent session interruptions with the error:

Mismatched content block type content_block_delta text
View output logs · Troubleshooting resources

This error appears randomly during conversations, causing the session to freeze/hang. The problem occurs in the VSCode extension but NOT in terminal mode.

Frequency

  • Before MCP servers disabled: Very frequent, almost every session
  • After MCP servers disabled: Less frequent, but still occurs intermittently

Steps to Reproduce

  1. Use Claude Code VSCode extension for normal conversations
  2. After several turns of conversation (random timing)
  3. Error popup appears: "Mismatched content block type content_block_delta text"
  4. Session becomes unresponsive

What I've Tried

1. Disabled MCP servers

Modified .mcp.json:

{
  "mcpServers": {}
}

Result: Reduced frequency but issue persists

2. Rolled back versions

  • Tried older VSCode extension versions
  • Tried older Claude Code CLI versions

Result: Same issue across versions

3. Switched to Terminal mode

claude

Result: ✅ Works perfectly with no errors

4. Tested remote operations

SSH to remote server (11.164.95.133:1100) and ran claw-eval tests:
Result: Tests complete successfully, but VSCode extension still shows intermittent errors

Error Context

Based on my research and the error message, this appears to be related to:

  • Streaming response parsing issues
  • Mismatched content blocks in API responses
  • Possibly related to issue #6836 (tool_use/tool_result block mismatch)

The error occurs during streaming responses when the client expects a specific JSON structure but receives something different.

Additional Observations

  • Terminal mode is completely stable
  • VSCode extension has the issue
  • Problem existed before and after disabling MCP servers
  • Rolling back versions doesn't help
  • Error seems random/timing-based rather than specific actions

Related Issues

  • #6836 - tool_use/tool_result block mismatch (150+ reports)
  • #42504 - VSCode streaming response disappear
  • #45010 - CJK characters garbled during streaming

Expected Behavior

Sessions should remain stable without random interruptions. Streaming responses should be parsed correctly even if minor format variations occur.

Workaround Currently Using

Using terminal mode as primary interface, VSCode extension as backup.

Additional Context

This is a serious usability issue that makes the VSCode extension unreliable for extended work sessions. Given that terminal mode works perfectly, the issue appears to be specific to the VSCode extension's handling of streaming responses.

I'm available to provide logs or additional debugging information if needed.

View original on GitHub ↗

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