File Editing Tools Not Functioning Properly in Cursor IDE

Subject: File Editing Tools Not Functioning Properly in Cursor IDE

Description:
I’m experiencing issues with the file editing functionality in Cursor IDE. Specifically, the agent and ask tools wont let me apply edits when attempting to modify files.

Steps to Reproduce:

  1. Attempt to edit a file using the agent tool
  2. Provide clear instructions and content for the edit
  3. The tool either:
    • Returns “The apply model made no changes to the file”
    • Or fails to apply any changes despite successful tool execution

Expected Behaviour:

  • The agent should successfully modify the target file with the provided content
  • Changes should be reflected in the file system
  • The tool should provide feedback if there are any issues

Actual Behavior:

  • The tool executes without errors but no changes are applied
  • The file remains unchanged or only partially modified
  • No error messages are provided to explain the failure

Environment:

  • OS: macOS (15.5 (24F74))
  • Shell: /opt/homebrew/bin/zsh

Cursor Version:

  • Version: 0.48.9 (Universal)
  • VSCode Version: 1.96.2
  • Commit: 61e99179e4080fecf9d8b92c6e2e3e00fbfb53f0
  • Date: 2025-04-12T19:19:47.994Z (1 mo ago)
  • Electron: 34.3.4
  • Chromium: 132.0.6834.210
  • Node.js: 20.18.3
  • V8: 13.2.152.41-electron.0
  • OS: Darwin arm64 24.5.0

Additional Context:

  • The issue occurs with both small and large file edits
  • The file permissions appear correct (readable and writable)
  • The issue is reproducible with different file types and content
  • Alternative approaches like using run_terminal_cmd also have limitations (cannot handle multiline commands)

Impact:
This issue significantly impacts productivity as it prevents automated file modifications, forcing manual file edits instead.

Request:
Please investigate the file editing functionality and provide a fix or workaround for this issue. Additionally, it would be helpful to have:

  1. Better error messages when edits fail
  2. A way to verify if changes were actually applied
  3. Alternative methods for file editing when the primary tool fails

Thank you for your assistance in resolving this issue.

1 Like

Additional Investigation: After thorough testing, we’ve confirmed that the edit_file tool is not documented in the codebase and appears to be a built-in Cursor IDE feature. The tool consistently fails to apply changes despite files being writable (confirmed by successful terminal commands). We’ve ruled out Git issues, file permissions, and file locks as potential causes. The tool takes three parameters (target_file, instructions, and code_edit) but fails silently, returning “The apply model made no changes to the file” without applying any changes. This suggests the issue is with the tool’s implementation in Cursor rather than with the file system or Git. We’ve successfully used terminal commands as a workaround, but this significantly impacts productivity. Please investigate the tool’s implementation.

Best,

J

I have same problemes with editing files by Gemini models

Same here, what helped is getting the files “smaller”, it appears the edit module cant deal with a larger codebase in single files.

1 Like

This can be, file_edit tool has limits.

@jasper-howard Hi, could you please provide more details?

The bug report has a template with parts that help developers and forum members analyze issues. Many issues like yours have been solved for specific cases that were identified, so knowing more details would help for this issue.

You can use following as guidelines and what info to add to the report.

Additionally please provide a Request ID (turn privacy off for that one request, so the Cursor team can see the issue)

Same issues here with Claude models. It wasn’t the case a couple of hours ago, but now it just gives me either instructions on how I should edit the code, or it just dumps the code in regular text within its response.
Unworkable.

If I have a read-only Git Diff open in a tab, Cursor will repeatedly try to edit the read-only diff instead of the actual file.

Request ID:
d3b8b7fe-323e-4009-8ad3-a059f250ff36

Thanks for the reply. I’ve added the request ID and A screenshot

Here’s the bug report on the same topic prepared by cursor:

Bug Report: Edit Tool File Modification Failure

Issue Description:

The edit tool in Cursor is failing to modify existing files while still working for creating new files. This appears to be a systematic issue affecting file modification operations.

Steps to Reproduce:

  1. Open an existing file in Cursor

  2. Attempt to use the edit tool to modify the file

  3. The edit tool fails with “The apply model made no changes to the file”

  4. However, creating new files with the edit tool works successfully

Test Cases Performed:

  1. Attempted to modify [redacted by Gary]:
  • Failed to add a comment at the top

  • Failed to modify imports

  • Failed to make any changes to existing content

  1. Created new file test_edit.txt:
  • Successfully created the file

  • Successfully added content

  • Edit tool worked as expected

Environment:

  • OS: macOS 24.5.0

  • Cursor Version: 1.0.0

  • File System: Local filesystem

  • File Permissions: Files are readable and writable

Troubleshooting Steps Attempted:

  1. Cleared Cursor’s cache:
  • Removed contents from ~/Library/Application Support/Cursor/Cache/

  • Removed contents from ~/Library/Application Support/Cursor/CachedData/

  • Removed contents from ~/Library/Application Support/Cursor/Code Cache/

  1. Restarted Cursor multiple times

  2. Performed system reboot

  3. Verified file permissions and locks

None of these steps resolved the issue.

Impact:

This bug significantly impacts the core functionality of Cursor, as the edit tool is a fundamental feature for code modification. It affects all file modification operations while preserving the ability to create new files.

Additional Notes:

  • This issue has been reported by multiple users

  • The problem appears to be specific to file modification rather than general tool functionality

  • File permissions and locks don’t appear to be the cause, as the files are writable through other means

  • The issue persists across multiple restarts and cache clearing attempts, suggesting it’s not a temporary state issue

Bizarre! Noting that the tool failure seemed to be restricted to the file stream_manager.py, I had it refactored to audio_stream_manager.py, which appeared to clear up the issue. That seems like some sort of clue.