When the currently active file is too large, Cursor cancels AI requests silently without showing any error message to the user. The chat appears to start processing, then immediately returns to “edit message” mode with no explanation. This happens even if the file is not included explicitly.
Steps to Reproduce
Open a large file (e.g., a large JSON data file, minified JS, etc.)
Ensure the large file is the active/focused tab
Type a message in the Cursor chat
Press Enter to submit
Expected Behavior
Cursor should display a user-friendly error message such as:
“Current file is too large to include as context”
“Memory limit exceeded - try closing large files”
Any clear indication of what went wrong
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Thanks for the detailed report. The silent failure (returning to edit mode with no error) could have several causes - network issues, authentication problems, rate limiting, or context limits.
Can you help narrow this down? First, try running network diagnostics (Cursor Settings > Network > Run Diagnostics) and please share that. Can you also provide a Request ID? (Chat context menu > Copy Request ID). Also try: does the issue still happen if you close the large file and have other files, or does chat work normally then?
Sorry I forgot to attach the error Found in Developer Console:
[composer] Error in AI response: undefined YDu: Operation would exceed heap memory limits
at aF.getValue
at ift.getCurrentFileInfoSyncWithoutDataframes
at ift.getCurrentFileInfo
This indicates the problem is with the big file.
Due to the nature of the problem I can’t provide a request ID - it is canceled.
Having the same exact issue. it won’t even work if I restart cursor or have all files closed. I have to delete the file from the workspace in order for it to work as expected.