Apply model ignores whitespace-only changes, breaking coding rule enforcement

:white_check_mark: Forum Check: I’ve checked the forum and haven’t found any similar issues reported.

:lady_beetle: Bug Description:
The apply model in Cursor IDE ignores whitespace-only changes when deciding whether to apply edits. This makes it impossible to enforce coding rules that require specific whitespace formatting, such as:

  • Converting space indentation to tab indentation
  • Adding required empty lines at the end of files
  • Removing trailing whitespace

The model appears to do a whitespace-insensitive comparison when deciding whether to apply changes, treating files with different whitespace as identical.

:counterclockwise_arrows_button: Reproduction Steps:

  1. Open any file with space indentation
  2. Try to convert the indentation to tabs using the edit_file tool
  3. The apply model will report “No changes made” even though the whitespace has changed
  4. The only workaround is to delete and recreate the file, which is problematic

:camera: Screenshots:
For some reasons I cannot submit screenshot now. But in brief, the core issue is that “No changes made” message is shown on the chat UI but in the editor the file contents do not change.

:laptop: System Info:

  • OS: Linux 6.11.0-19-generic
  • Cursor Version: 0.48.2, 0.48.6
  • Note: This issue appears to be a regression, as older versions of Cursor were able to successfully apply whitespace changes.

:prohibited: Impact:
This issue can be worked around, but it wll significantly impact workflow when trying to enforce coding standards:

  • Requires multiple tool calls (delete + recreate) instead of a single edit
  • Requires user approval for each deletion
  • Loses file metadata
  • Makes it impossible to enforce whitespace-related coding rules through automated tools
  • Forces manual intervention for whitespace changes

Additional Context:
This is particularly problematic for projects with strict coding rules about whitespace, such as:

  • Using tabs for indentation
  • Having exactly 2 empty lines at the end of files
  • No trailing whitespace
  • Specific alignment rules

The current behavior makes it impossible to enforce these rules through the edit_file tool, requiring manual intervention or complex workarounds.

(Note: This report is mostly drafted by the agent and I’ve checked the content manually.)

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