Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor 2.0 often creates .md which cannot be opened in the IDE.
Unable to open ‘documentation.md’
Assertion Failed: Argument is ‘undefined’ or ‘null’
This disrupts my workflow quite a bit because I constantly make and update .md files. They are the “memory”.
I’m on Windows and don’t have any special add-ons or MCPs or anything.
I find if I open the doc before the agent updates, it’s less like to have an issue.
The agents I use are Sonnet 4.5 Thinking and Composer 1.0.
Steps to Reproduce
Ask the agent to create a .md file for documentation or planning.
Expected Behavior
The .md file should be openable in the IDE by clicking on it from the file explorer. This is very basic functionality.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.0.38 (system setup)
VSCode Version: 1.99.3
Commit: 3fa438a81d579067162dd8767025b788454e6f90
Date: 2025-10-29T20:45:40.883Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.17763
For AI issues: which model did you use?
Sonnet 4.5 and Composer.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor
Thanks for the detailed bug report!
To help us debug this, could you please share:
- Open Help > Toggle Developer Tools and check the Console tab when the error appears - share any error messages you see there
- Can you open the problematic .md file using File > Open or in an external text editor (like Notepad)?
- Does this happen with all .md filenames or specific patterns (e.g., files with spaces, special characters)?
- What’s the file path where these .md files are being created?
Also, please try disabling extensions - they can cause unexpected file opening issues:
- Run
cursor --disable-extensions from command line
- If .md files open correctly, re-enable extensions one by one to find the culprit or use Extension bisect
Thanks for the detailed bug report!
To help us debug this, could you please share:
- Open Help > Toggle Developer Tools and check the Console tab when the error appears - share any error messages you see there
- Can you open the problematic .md file using File > Open or in an external text editor (like Notepad)?
- Does this happen with all .md filenames or specific patterns (e.g., files with spaces, special characters)?
- What’s the file path where these .md files are being created?
Also, please try disabling extensions - they can cause unexpected file opening issues:
- Run
cursor --disable-extensions from command line
- If .md files open correctly, re-enable extensions one by one to find the culprit or use Extension bisect
Thanks Sanjeed,
I love Cursor 2.0, but this “bug” is causing me pain because I make a .md for every page of my website. Below is an analysis (written in cursor, of course!)
Thank you for the follow-up. Here are the details and our findings.## Console errorsFrom Developer Tools > Console:
ERR Unable to retrieve document from URI ‘file:///d%3A/inetpub/wwwroot/askARTreact/docs/admin/reports/ad-reporting.md’: Error: Unable to retrieve document from URI ‘file:///d%3A/inetpub/wwwroot/askARTreact/docs/admin/reports/ad-reporting.md’
Lyu: Assertion Failed: Argument is undefined or null.
The error occurs when trying to open programmatically created markdown files immediately after creation.## External editorsYes, files open correctly in:- Notepad++
- PowerShell (Get-Content)
- VS Code (if installed)
- Windows Notepad
Files exist, have correct content and encoding, and are readable by other tools. The issue is Cursor-specific.## Filename patternsAffects all .md files created programmatically:- Files with spaces: MD file creation issue.md — fails if created programmatically
- Files with hyphens: ad-reporting.md — fails if created programmatically
- Simple names: test.md — fails if created programmatically
- No special characters required; any programmatically created file fails
Files manually created in Cursor (File > New) work immediately.## File pathsIssue occurs at:- D:\inetpub\wwwroot\askARTreact\docs\admin\reports\ad-reporting.md
- D:\inetpub\wwwroot\askARTreact\docs\0 Common\Windows-File-Creation-Issue.md
- Any path in the workspace where files are created programmatically
Extension testingTested with cursor --disable-extensions: issue persists. This appears to be a core Cursor IDE issue, not extension-related.## Root cause analysisAfter testing:1. Problem: Files created programmatically (via AI write tool, PowerShell, etc.) cannot be opened in Cursor immediately. They show:
- “Unable to retrieve document from URI”
- “Assertion Failed: Argument is ‘undefined’ or ‘null’”
- Workaround: Restarting Cursor IDE allows the files to open. This suggests a file system watcher cache issue.
- Solution found: Files manually created in Cursor (File > New, then save) open immediately and remain accessible. Populating those files programmatically works fine.
- Root cause hypothesis: Cursor’s Electron-based file system watcher on Windows is not registering programmatically created files. The watcher relies on OS-level file system events that may not fire for files created by external tools. Restarting forces a full file system rescan, which registers the files.
- Regression: This started after upgrading to Cursor 2.0. The previous version did not have this issue.
Evidence- Programmatically created files fail to open immediately
- Same files open after Cursor restart
- Same files open in external editors immediately
- Manually created files work immediately
- Issue affects all programmatically created .md files, regardless of filename pattern
- Issue persists with all extensions disabled
- Not related to file encoding, content, or permissions
RecommendationThis appears to be a regression in Cursor 2.0’s file system watcher. Please investigate:1. The file system watcher implementation on Windows
- How programmatically created files are registered
- Why manually created files are immediately accessible while programmatically created files are not
The workaround (manual file creation) is functional but not ideal for workflows that rely on programmatic file creation.Please let me know if you need additional details or test cases.
| sanjeed5 Community Developer
October 31 |
Thanks for the detailed bug report!
To help us debug this, could you please share:
- Open Help > Toggle Developer Tools and check the Console tab when the error appears - share any error messages you see there
- Can you open the problematic .md file using File > Open or in an external text editor (like Notepad)?
- Does this happen with all .md filenames or specific patterns (e.g., files with spaces, special characters)?
- What’s the file path where these .md files are being created?
Also, please try disabling extensions - they can cause unexpected file opening issues:
- Run
cursor --disable-extensions from command line
- If .md files open correctly, re-enable extensions one by one to find the culprit or use Extension bisect
Same here — I use Cursor to generate and update many Markdown files, and since the major update, I’ve been running into this issue every time after an agent update or when generating a Markdown file. As a workaround, I have to close the file, accept the changes blindly, and then reopen it. Cursor becomes practically unusable this way. Please fix it as soon as possible.