Cursor silently rewrites Markdown files on open (breaks links, removes code blocks) — persists with --disable-extensions

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Opening any .md file in Cursor silently rewrites it on disk — no user input, no visible AI-suggestion UI. Changes range from cosmetic (extra blank lines around headings, table column padding) to genuinely destructive:

  • [`code`](url) link patterns become `[code](url)` — the code span wraps literal link markup, breaking clickability on rendered markdown
  • Entire fenced bash code blocks get removed from nested list items (I had a numbered-list instructions file where several code examples disappeared)
  • YAML frontmatter in SKILL-style files (--- name: ... ---) gets converted to plain ## name: ... headings (breaks any tool parsing frontmatter)
  • ~10s (approximately-tilde) → ~~10s (GFM strikethrough — meaning changes!)
  • Trailing newlines stripped (makes diffs noisy, breaks POSIX convention)

Every doc file I open in Cursor silently corrupts the file I was trying to read. This breaks rendering on GitHub and anywhere markdown is consumed by a tool parsing it.

Steps to Reproduce

  1. In a repo that contains .md files with [code](url) link patterns or fenced code blocks in nested lists, start with a clean working tree (git status shows nothing modified).
  2. Open any .md file in Cursor (click from explorer, or cursor path/to/file.md from terminal).
  3. Do NOT touch keyboard or mouse — do not edit, scroll, click, or type.
  4. Wait ~10 seconds.
  5. Run git status in a terminal.

Result: file has been silently rewritten on disk. git diff shows systematic transformations (listed in Describe the Bug).

This reproduces 100% of the time on my machine for files in docs/ and .ai/ subdirectories with [code](url) or fenced code blocks in nested lists.

Expected Behavior

Opening a markdown file should not modify it on disk, period.

Any AI-suggested edits should be surfaced as reviewable suggestions (ghost text, diff view, Tab-to-accept), never auto-applied to the file’s contents without the user explicitly accepting them.

If there is a hidden setting that controls this behavior, it should:

  • Be easily discoverable (documented, settings search term working)
  • Default to opt-in for destructive transformations (link swaps, code block removal)
  • Be controllable org-wide for teams that don’t want it at all

Operating System

MacOS

Version Information

Cursor: 3.1.17
Commit: fce1e9ab7844f9ea35793da01e634aa7e50bce90
Platform: arm64
OS: macOS 26.2 (build 25C56)

Additional Information

What I’ve already ruled out (full investigation)

  1. Prettier VS Code extension (esbenp.prettier-vscode): fully uninstalled (registry + disk). Issue persists.
  2. Any other extension: none of my remaining 8 extensions declare markdown language support or a DocumentFormattingEditProvider (I audited each package.json).
  3. CLI Prettier (./node_modules/.bin/prettier): produces different output than what Cursor does — the cause is NOT plain Prettier config. Plain Prettier only does table padding + JSON normalization. Cursor additionally does the link-code swap and code-block removal, which Prettier does not.
  4. Workspace .vscode/settings.json / .prettierignore: doesn’t stop it.
  5. User settings.json with every [markdown] auto-action disabled:
    "github.copilot.nextEditSuggestions.enabled": false,
    "[markdown]": {
      "editor.formatOnSave": false,
      "editor.formatOnPaste": false,
      "editor.formatOnType": false,
      "editor.defaultFormatter": null,
      "editor.codeActionsOnSave": {},
      "editor.suggestOnTriggerCharacters": false,
      "editor.quickSuggestions": { "other": false, "comments": false, "strings": false }
    }
    
    Doesn’t stop it.
  6. cursor --disable-extensions: still happens. This is the critical data point — the behavior is in Cursor core, not any extension.

Sample diff (link-code swap)

- **Schemas:** [`routes/v1/queries/validations.ts`](../packages/.../validations.ts)
+ **Schemas:** `[routes/v1/queries/validations.ts](../packages/.../validations.ts)`

Before: bold label + clickable code-styled link.
After: bold label + code span containing literal [text](url) markdown source — no longer clickable.

Ask

  • What hidden Cursor setting controls this, if any?
  • Can this be made opt-in instead of always-on?
  • Is there an org-wide toggle for teams? Currently unusable for docs-heavy repos — every file-open introduces unreviewed corruption.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

HI @Yang_Wang5!

Thanks for the report. Can you confirm if you’re using the classic editor or the Agents Window?

Hey @Colin , thanks for the reply, I’m using Agents Window.

Thanks. In that case, this matches a known bug we’re tracking where opening or viewing a markdown file in the Agents Window silently writes normalized markdown back to disk. I’ve added your report to that bug we’re tracking, and I’ll update this thread when there’s more to share!

Thanks again for the report @Yang_Wang5! This should get fixed in v3.3.

Thanks @Colin for your team’s quick fix!!

@Colin Is there a way to walk aroud this?

You can switch to Nightly! (Cursor Settings > Beta). Otherwise, you’ll need to wait for the fix to ship. 3.3 should be around the corner.