Chat renders wrong content in markdown code blocks - substitutes sections

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor Chat has a critical markdown rendering bug where code blocks display content from a completely different section of the document.
Specifically: a regular text code block (ASCII directory tree) is being replaced with Mermaid diagram code from another section.

Steps to Reproduce

  1. Create a markdown file with multiple sections
  2. Include a Mermaid diagram in Section 1.4:
### 1.4. Diagram
\`\`\`mermaid
graph TD
    subgraph "Layer"
        A[Component]
    end
\`\`\`
  1. Include a regular code block in Section 2.1:
### 2.1. Directory Tree
\`\`\`
res://
├── scenes/
│   ├── main/
\`\`\`
  1. Send this content via Cursor Chat
  2. View the rendered output in Chat

Expected Behavior

Section 2.1 should display the directory tree as written in the file.

Screenshots / Screen Recordings

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.46
VSCode Version: 1.105.1
Commit: ab326d0767c02fb9847b342c43ea58275c4b1680
Date: 2025-12-02T03:59:29.283Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.8.0-88-generic

For AI issues: which model did you use?

Sonnet 4.5, Gemini 3 Pro

Additional Information

  • :white_check_mark: The actual file content is CORRECT when opened in editor
  • :cross_mark: Only Cursor Chat rendering is broken
  • :warning: This is NOT an AI model issue - the bug reproduces consistently across different AI models (Claude Sonnet, etc.)
  • The bug substitutes entire code block content from one section into another
  • This makes Chat completely unreliable for reviewing markdown documentation

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. We need more data to investigate.

Please check and share:

  • A minimal markdown file that reproduces the issue, and how you send content to Chat (copy-paste, “attach file”, in parts, etc.)
  • Export the problematic chat and check if the .md shows any substitution: chat menu → Export Chat (Export | Cursor Docs). Attach the export
  • The Request ID of a message where you see the substitution: chat menu → Copy Request ID. Guide: Getting a Request ID | Cursor Docs

Once you have these, attach the file here.