Cursor fails silently when current file exceeds memory limits

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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

  1. Open a large file (e.g., a large JSON data file, minified JS, etc.)
  2. Ensure the large file is the active/focused tab
  3. Type a message in the Cursor chat
  4. 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)

Version: 2.1.50 (Universal)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Sonnet 4.5, Composer 1

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

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?

Thanks!

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.

Thank you

Thanks for the report, I’ve raised it with the team.

1 Like

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.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.