-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Which version of the app are you using?
v3.16.3
Which API Provider are you using?
Anthropic
Which Model are you using?
sonnet-3.7
What happened?
When using the apply_diff tool, the system marks the file as "recently modified" in the environment details. This triggers a notification to the AI that the file has been modified, suggesting that it should be re-read before editing again.
This leads to unnecessary read_file operations even when the changes were made by Roo itself, wasting tokens and slowing down the workflow.
This feature (regression?) was introduced in commit 5352beb (PR #2440).
Expected behavior: Files should only be marked as "recently modified" if their content has been changed outside of Roo. Changes made by Roo's own tools should not trigger this notification.
Steps to reproduce
- Use
apply_diffon a file - Observe that the environment details show the file as "recently modified" in the next response
- The AI is prompted to re-read the file before making further edits, which is unnecessary since Roo already knows about the changes it made
Relevant API REQUEST output
<apply_diff>
<path>locales/__tests__/lint-translations.test.ts</path>
<diff>
<<<<<<< SEARCH
...
=======
...
>>>>>>> REPLACE
</diff>
</apply_diff>
Environment details example
After applying the diff, the environment details include:
# Recently Modified Files
These files have been modified since you last accessed them (file was just edited so you may need to re-read it before editing):
locales/__tests__/lint-translations.test.ts
This notification prompts the AI to unnecessarily re-read the file, even though it was modified by Roo itself.
Additional context
This issue affects workflow efficiency in all modes that use the apply_diff tool, as it causes unnecessary token usage for re-reading files that were modified by Roo itself.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status