[FEATURE]: Compare files by Hash as fallback before marking them as 'Must be Read Again' on Edits if Timestamp Doesn't Match #2435

Open
opened 2026-02-16 17:35:36 -05:00 by yindo · 1 comment
Owner

Originally created by @Sewer56 on GitHub (Nov 1, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When you use OpenCode, the Edit tool requires that the timestamp of the file matches the last known timestamp; however there are cases where the file has not changed, but the coding model is forced to re-read the file. That wastes context and time.

There's a few cases where this can happen:

  • /undo : Simply undoing when a file was edited. When you want to tweak behaviour.
  • Making a manual change to a file in a code editor with AutoSave enabled and changing your mind
  • Reverting a file in git (manual undo). e.g. 'I wanted to keep some of the changes'

In the rare case the timestamp doesn't match- we could instead compare by hash.


Just a long time pet peeve of mind, thought I'd mention.

Originally created by @Sewer56 on GitHub (Nov 1, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request When you use OpenCode, the `Edit` tool requires that the timestamp of the file matches the last known timestamp; however there are cases where the file has not changed, but the coding model is forced to re-read the file. That wastes context and time. There's a few cases where this can happen: - /undo : Simply undoing when a file was edited. When you want to tweak behaviour. - Making a manual change to a file in a code editor with AutoSave enabled and changing your mind - Reverting a file in git (manual undo). e.g. 'I wanted to keep some of the changes' In the rare case the timestamp doesn't match- we could instead compare by hash. ----- Just a long time pet peeve of mind, thought I'd mention.
yindo added the discussion label 2026-02-16 17:35:36 -05:00
Author
Owner

@rekram1-node commented on GitHub (Nov 2, 2025):

yeah it can be painful

@rekram1-node commented on GitHub (Nov 2, 2025): yeah it can be painful
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2435