Critical Bug Report: Files Zeroed Out During Restart

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Timeline & Context

Before restart:

  • Created ~79 migration files (database migrations)
  • Updated multiple documentation files
  • Almost 100 files open and being tracked by Cursor
  • High file activity/workload in the IDE

During restart:

  • 13:33: Files zeroed out (all same timestamp)
  • User observed: Spinning beachball (macOS system freeze indicator)
  • Critical observation: Disk activity and CPU usage ceased while spinning beachball remained active - indicating Cursor was completely frozen/stuck
  • File write message/notification appeared during restart
  • 13:34:13: Cursor session started (right after incident)

Files Affected

19 PHP files were zeroed out, including:

  • Critical models: Catalog.php, Brand.php, PermissionLevels.php
  • Service files: InventoryCountsService.php, TimezoneHelper.php, TemplateMacroReplacer.php
  • Model files: FulfillmentOrderLineItem.php, WarehouseSpecialHours.php, CatalogDetail.php, PurchaseOrderLineItem.php, CatalogDefaults.php, TransferOrder.php
  • Console commands: Multiple command files
  • Controllers: AssetController.php, FulfillmentOrderController.php

Evidence

  • All files had identical timestamp (Dec 17 13:33)
  • Cursor logs show session started immediately after (~/Library/Application Support/Cursor/Logs/20251217T133413/)
  • Process monitor shows high CPU usage around that time
  • No disk space issues
  • Files were tracked in git, successfully restored
  • User saw spinning beachball and file write message during restart

Impact

CRITICAL: This bug can cause data loss. Files were zeroed out without warning during a normal restart operation. If files weren’t in git, they would have been permanently lost.

Screenshots / Screen Recordings

No screenshots available - The incident occurred during restart when the system was showing a spinning beachball. However, the evidence is clear:

  • All affected files show 0 bytes
  • All files have identical modification timestamp (Dec 17 13:33)
  • Cursor logs confirm session started immediately after (13:34:13)
  • Files successfully restored from git, confirming they were zeroed out

What was observed: Spinning beachball (macOS system freeze indicator) and a file write message/notification during Cursor restart.

Additional Notes

  • Files were successfully restored from git, but this could have been catastrophic if not version controlled
  • The bug appears to affect files that Cursor’s analytics/review system is trying to process
  • This happened during a normal restart, not during any explicit file operations
  • Important context: The incident occurred when Cursor was tracking almost 100 files (including ~79 newly created migration files plus updated documentation). The fact that disk activity and CPU ceased while the spinning beachball remained active suggests Cursor’s file analysis/indexing system froze while attempting to process the large number of tracked files, and during this freeze, files were being truncated.
  • This suggests the bug may be triggered by:
    • Large number of files being tracked simultaneously
    • Heavy file analysis workload during restart
    • Race condition or deadlock in Cursor’s file processing syste

Steps to Reproduce

Steps to Reproduce

Note: This appears to be intermittent and may be related to Cursor’s file analysis/indexing system during restart, especially when many files are open and being tracked.

  1. Open Cursor IDE (version 2.2.20) with a project containing many files (~100 files open and tracked)
  2. Perform intensive file operations (e.g., create ~79 migration files, update multiple documentation files)
  3. Have many files open and actively being tracked by Cursor’s file watcher/analytics system
  4. Restart Cursor (either manually or let it restart automatically after an update)
  5. During restart, observe:
    • Spinning beachball (macOS system freeze indicator)
    • Critical: Disk activity and CPU usage cease while spinning beachball remains active (Cursor appears frozen/stuck)
    • File write message/notification (indicating Cursor was writing to files)
  6. After Cursor finishes loading (or is force-quit and restarted), discover that multiple PHP files have been truncated to 0 bytes
  7. Verify files are zeroed by checking file sizes: ls -lh <file> shows 0 bytes
  8. Check file timestamps: all affected files show identical modification time (Dec 17 13:33 in this case)

Note: This happened during a normal restart operation, not during any explicit file operations. The bug appears to affect files that Cursor’s analytics/review system may be trying to process during startup, especially when under heavy file tracking load.

Expected Behavior

Expected Behavior

Cursor should load normally without modifying or truncating any project files. Files should remain intact with their original content after restart.

Actual Behavior

Multiple PHP files were zeroed out (truncated to 0 bytes) during restart, causing complete data loss for those files. Files were only recoverable because they were tracked in git.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.20
VSCode Version: 1.105.1
Commit: b3573281c4775bfc6bba466bf6563d3d498d1070
Date: 2025-12-12T06:29:26.017Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @Alejandro_Lobos_Kuns and thank you for the detailed bug report.

I have tried to reproduce the issue but could not get the setup to zero out files.

Could you check following so we may better find the cause and fix it:

  • Does this occur on any open files or on not yet committed files?
  • Is any other IDE or process having those files open as well? (Backup, TimeMachine, iCloud)
  • Was agent still running when you restarted Cursor?
  • How full is your drive/SSD?
  • Has macOS been attempting updates at same time as well? e.g. Downloading update files,…
  • Please update to the latest Cursor version and let me know if the same issue repeats

It is possible that Cursor tried to write files but the filesystem for some reason did not yet commit the files to the drive, therefore the files being created with 0 bytes.
This may occur when filesystem is close to full, running out of inodes, or kept busy by other processes.

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