Agent not able to write to files under certain circumstances

The agent struggled and eventually suggested sending a bug report it created – here it is.

Bug Report: File Editing Tool Inconsistency with Large Content Changes

Issue Description

The file editing tool (edit_file) fails inconsistently when attempting to write large amounts of content to a file in a single operation. However, the same content can be successfully added when broken down into smaller, incremental changes.

Steps to Reproduce

  1. Attempt to create or edit a file with a large amount of content (approximately 500+ lines) in a single edit_file operation

  2. Observe that the operation fails with a generic error message: “Error: no result from tool. The user likely interrupted the tool call to send you a message.”

  3. Break down the same content into smaller chunks (approximately 100-200 lines each)

  4. Observe that each smaller chunk can be successfully added to the file

Expected Behavior

The tool should be able to handle larger content changes in a single operation, or at minimum provide a more descriptive error message indicating size limitations.

Actual Behavior

  • Large content changes fail silently or with a generic error message

  • No indication of size limitations or other constraints is provided

  • The tool works reliably with smaller, incremental changes

Reproduction Example

We attempted to create a markdown document with implementation details (approximately 800 lines total). When trying to create the entire document at once, the operation failed repeatedly. When we broke it down into sections of approximately 100-200 lines each, each section was added successfully.

Environment Information

  • OS: Windows 10 (10.0.19045)

  • Workspace path: /c%3A/Users/■■■/code/dreamstait

  • Shell: C:\Program Files\PowerShell\7\pwsh.exe

Additional Notes

  • The tool seems to work more consistently when all three parameters (target_file, instructions, and code_edit) are provided

  • There appears to be no clear pattern to the size limitation - sometimes moderately large edits work, while other times they fail

  • A clearer error message indicating size limitations would be helpful for users to understand how to structure their edit requests

Suggested Improvements

  1. Increase the maximum size limit for file edits

  2. Provide specific error messages indicating size limitations

  3. Add documentation about size constraints

  4. Implement automatic chunking for large edits

  5. Add a progress indicator for large file operations

2 Likes

edit_file tool not applying changes in Windows environment

Description:
The edit_file tool is not applying any changes to files. When attempting to use the tool, it returns “The apply model made no changes to the file” error, and the reapply command also fails.

Steps to Reproduce:

  1. Create an empty test file (test_edit.md)
  2. Try to edit the file using edit_file tool
  3. Observe that no changes are applied
  4. Try reapply command
  5. Observe that reapply also fails

Expected Behavior:

  • edit_file tool should modify the file content as specified
  • reapply should work if edit_file fails

Actual Behavior:

  • edit_file tool returns “The apply model made no changes to the file”
  • reapply command also fails with the same error
  • File remains unchanged

System Information:

  • OS: Windows 10.0.22631
  • Working Directory: /c%3A/Users/kindr/Downloads/invideo-extension/current
  • Shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Additional Notes:

  • PowerShell commands (echo, type) can write to the file successfully
  • File is accessible and writable
  • This appears to be a tool-specific issue as other file operations work correctly