Web UI: /undo - Changes to underlying files were "undone" at file level, but not in UI #8165

Open
opened 2026-02-16 18:09:19 -05:00 by yindo · 3 comments
Owner

Originally created by @jeremyakers on GitHub (Jan 31, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

This is a weird one.

I decided to try using /init to see if it would "improve" my AGENTS.md file... Instead of removed most of what I had in there. So I did /undo to bring it back. However, this is what I see in the UI:

Image

As you can see: The UI still shows the "changes" exist. But in the terminal when I cat AGENTS.md - the changes are not there.

If I close the review window and switch over to the general file browser "All Files", it highlights the file as modified:

Image

And if I open the file from here: it still shows the version of the file with the agents modifications. Not the version shown in terminal:

Image

One thing to note: Since I've seen several issues around git sub repos and submodules: My project workspace does contain nested git repos. However in all of the issues I've seen with nested git repos: The /undo functionality is only affected when trying to undo changes that exist within one of the nested repos. In this case: This is the AGENTS.md file in the root folder of the project, not a file in a nested repo. And the actual file was successfully reverted, it's just not reflected in the UI, so I don't believe this is a related issue.

Plugins

None

OpenCode version

1.1.47

Steps to reproduce

  1. Open Web UI on an existing project
  2. Run /init
  3. Run /undo
  4. Compare the file contents displayed in the UI with what is shown in terminal via 'cat', 'vi', etc

Screenshot and/or share link

Pasted above

Operating System

Ubuntu 22.04

Terminal

None - Web UI

Originally created by @jeremyakers on GitHub (Jan 31, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description This is a weird one. I decided to try using /init to see if it would "improve" my AGENTS.md file... Instead of removed most of what I had in there. So I did /undo to bring it back. However, this is what I see in the UI: <img width="1920" height="962" alt="Image" src="https://github.com/user-attachments/assets/5a32bb89-e86c-4c7e-adef-99a0fe264de3" /> As you can see: The UI still shows the "changes" exist. But in the terminal when I `cat AGENTS.md` - the changes are not there. If I close the review window and switch over to the general file browser "All Files", it highlights the file as modified: <img width="311" height="442" alt="Image" src="https://github.com/user-attachments/assets/9d8e1fc5-7253-4d43-ae3a-5c09e308a9f5" /> And if I open the file from here: it still shows the version of the file with the agents modifications. Not the version shown in terminal: <img width="1252" height="153" alt="Image" src="https://github.com/user-attachments/assets/f6666d26-de52-4edd-8461-19fe599b74e2" /> One thing to note: Since I've seen several issues around git sub repos and submodules: My project workspace does contain nested git repos. However in all of the issues I've seen with nested git repos: The /undo functionality is only affected when trying to undo changes that exist within one of the nested repos. In this case: This is the AGENTS.md file in the root folder of the project, not a file in a nested repo. And the actual file was successfully reverted, it's just not reflected in the UI, so I don't believe this is a related issue. ### Plugins None ### OpenCode version 1.1.47 ### Steps to reproduce 1. Open Web UI on an existing project 2. Run /init 3. Run /undo 4. Compare the file contents displayed in the UI with what is shown in terminal via 'cat', 'vi', etc ### Screenshot and/or share link Pasted above ### Operating System Ubuntu 22.04 ### Terminal None - Web UI
yindo added the bugweb labels 2026-02-16 18:09:19 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

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

  • #11062: Web UI reports "No changes" even after agent has made changes - similar UI display issue where changes aren't reflected
  • #4548: /undo does not update Modified Files list - specific /undo issue where UI doesn't update properly after undoing
  • #5840: [Tracking] Edit tool reliability: "modified since last read" errors - related tracking issue for undo/redo problems with file state synchronization

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

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be a duplicate of existing issues. Please check: - #11062: Web UI reports "No changes" even after agent has made changes - similar UI display issue where changes aren't reflected - #4548: /undo does not update Modified Files list - specific /undo issue where UI doesn't update properly after undoing - #5840: [Tracking] Edit tool reliability: "modified since last read" errors - related tracking issue for undo/redo problems with file state synchronization Feel free to ignore if none of these address your specific case.
Author
Owner

@jeremyakers commented on GitHub (Jan 31, 2026):

Update: I tried closing that session, switching to a new session, switching to an older session, etc. None of these actions helped: Every time I re-opened AGENTS.md - it still showed the agent modifications.

Something that partially helped: I did a forced browser refresh (Shift + Reload) and that made it so that when I opened AGENTS.md in the Web UI, it at least showed the correct contents. So that aspect appears to be a caching issue between the browser and Web UI HTTP server.

However: The "Session Changes" UI continues to insist the changes are still there:

Image
@jeremyakers commented on GitHub (Jan 31, 2026): Update: I tried closing that session, switching to a new session, switching to an older session, etc. None of these actions helped: Every time I re-opened AGENTS.md - it still showed the agent modifications. Something that partially helped: I did a forced browser refresh (Shift + Reload) and that made it so that when I opened AGENTS.md in the Web UI, it at least showed the correct contents. So that aspect appears to be a caching issue between the browser and Web UI HTTP server. However: The "Session Changes" UI continues to insist the changes are still there: <img width="1264" height="459" alt="Image" src="https://github.com/user-attachments/assets/aa15e600-6d7e-4ffb-93b8-07d1550665b0" />
Author
Owner

@jeremyakers commented on GitHub (Jan 31, 2026):

I tried completely shutting down OpenCode (/exit on the terminal session, which ended the HTTP server)
And closing the browser window completely to be certain there's no HTTP caching going on here.

Then I restarted opencode --mdns (Which auto updated to 1.1.48 btw) and opened a new browser to http://localhost:4096 - It still shows the "changes":

Image
@jeremyakers commented on GitHub (Jan 31, 2026): I tried completely shutting down OpenCode (/exit on the terminal session, which ended the HTTP server) And closing the browser window completely to be certain there's no HTTP caching going on here. Then I restarted `opencode --mdns` (Which auto updated to 1.1.48 btw) and opened a new browser to http://localhost:4096 - It still shows the "changes": <img width="1829" height="658" alt="Image" src="https://github.com/user-attachments/assets/6f87bbbe-15a9-4772-9440-8908ad10174c" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8165