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

**URL:** <https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747>\
**Category:** Bug Reports\
**Created:** [April 22, 2026, 9:21pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747 "2026-04-22T21:21:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yang\_Wang5](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@Yang\_Wang5](https://forum.cursor.com/u/Yang_Wang5)\
**Post date:** [April 22, 2026, 9:21pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/1 "2026-04-22T21:21:46Z")

</div>

### 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:**

```json
"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)

```diff
- **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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [April 23, 2026, 10:17am UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/5 "2026-04-23T10:17:26Z")

</div>

HI @Yang_Wang5!

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

---

<div class="post-metadata">

**Author:** ![Yang\_Wang5](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@Yang\_Wang5](https://forum.cursor.com/u/Yang_Wang5)\
**Post date:** [April 23, 2026, 5:24pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/7 "2026-04-23T17:24:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [April 24, 2026, 1:14pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/9 "2026-04-24T13:14:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [April 28, 2026, 4:02pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/11 "2026-04-28T16:02:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yang\_Wang5](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@Yang\_Wang5](https://forum.cursor.com/u/Yang_Wang5)\
**Post date:** [April 28, 2026, 4:13pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/12 "2026-04-28T16:13:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JinnanDuan](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jinnanduan/32/107254_2.png) [@JinnanDuan](https://forum.cursor.com/u/JinnanDuan)\
**Post date:** [April 30, 2026, 1:10pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/13 "2026-04-30T13:10:43Z")

</div>

@Colin Is there a way to walk aroud this?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [April 30, 2026, 2:30pm UTC](https://forum.cursor.com/t/cursor-silently-rewrites-markdown-files-on-open-breaks-links-removes-code-blocks-persists-with-disable-extensions/158747/14 "2026-04-30T14:30:19Z")

</div>

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.
