Why must the read tool be executed before the edit tool #2912

Closed
opened 2026-02-16 17:37:46 -05:00 by yindo · 1 comment
Owner

Originally created by @mooneal on GitHub (Nov 17, 2025).

Question

I've read the description of the edit tool and found it states: "You must use your Read tool at least once in the conversation before editing."
I wonder, if a file is created by AI and its content is already present in the context, would using the Read tool again unnecessarily increase token costs?

Originally created by @mooneal on GitHub (Nov 17, 2025). ### Question I've read the description of the edit tool and found it states: "You must use your Read tool at least once in the conversation before editing." I wonder, if a file is created by AI and its content is already present in the context, would using the Read tool again unnecessarily increase token costs?
yindo closed this issue 2026-02-16 17:37:46 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 17, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1348: Discusses the same read-before-edit requirement and how AI tries to work around it by only reading file headers
  • #3681: Addresses the inefficiency of forcing re-reads when files haven't actually changed, proposing hash-based comparison as an optimization
  • #1573: Specifically discusses token optimization and reducing overhead when context is already present
  • #1379: Related issue about redundant read operations when the same file is referenced multiple times

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 17, 2025): This issue might be a duplicate of existing issues. Please check: - #1348: Discusses the same read-before-edit requirement and how AI tries to work around it by only reading file headers - #3681: Addresses the inefficiency of forcing re-reads when files haven't actually changed, proposing hash-based comparison as an optimization - #1573: Specifically discusses token optimization and reducing overhead when context is already present - #1379: Related issue about redundant read operations when the same file is referenced multiple times Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2912