LLM Generates Undeletable NUL Files in Workspace

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor AI occasionally generates meaningless files with reserved system names (e.g., “nul”) that cannot be deleted using standard methods. These files clutter the workspace and require special commands to remove. While this appears to originate from the underlying LLM models (particularly cloud-based ones), implementing validation at the Cursor level would prevent this issue.

Steps to Reproduce

  1. On Win10, use Cursor AI with cloud-based LLM models
  2. Request file generation or code operations through chat
  3. Occasionally, a file named “nul” or similar reserved name appears in the workspace
  4. Attempt to delete the file using normal methods (right-click delete, Del key, etc.)
  5. Deletion fails due to reserved system name

Expected Behavior

  • Cursor should validate generated file names before creation
  • Reserved system names (NUL, CON, PRN, AUX, COM1-9, LPT1-9, etc.) should be blocked or automatically renamed
  • All generated files should be deletable through standard file operations

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.48 (system setup)
VSCode Version: 1.105.1
Commit: ce371ffbf5e240ca47f4b5f3f20efed084991120
Date: 2025-12-04T19:26:27.263Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.19045

For AI issues: which model did you use?

Calude Opus 4.5 max

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This looks like a case of a reserved name on Windows.

Let’s narrow it down:

  • Specify the full path and the exact Cursor action that created the file: Chat Apply, Review, or Cloud Agent
  • Share a sample prompt and how often it reproduces
  • Confirm the model and try reproducing with another model for comparison
  • Send the Request ID of the action that created the file: Getting a Request ID | Cursor Docs
  • Try deleting the file via the terminal and share the exact error output, as well as errors from Help > Toggle Developer Tools > Console

I’ll create a ticket to validate file names on Windows and we’ll get back with an update.

Thanks for the feedback. I’m pretty sure this isn’t caused by Cursor AI only, as it also happens when using the Claude model with Cline in VSCode. From a user experience perspective, I’d consider it a bug worth fixing. This issue doesn’t occur very often, but I’ll make sure to record it the next time it happens.

1 Like

now I got the nul file again during a quite long AI feedback, when I see it unexpectedly, when the AI is still feeding back, then I force to interrupted it. The response id is: 96de49ac-22fc-42fb-853d-32fde6a458bc

image

1 Like

Oh, now I got another one, this is still another quite long chat feedback, the re id: ef841f71-14af-442e-8e53-777cf3c38946, which produced nul.
image

1 Like

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