claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Desktop file viewer serves a stale cached copy of an already-open file; edits only appear after navigating away and back

Open its-coughfee opened this issue 3 months ago • 4 comments

What happens

With a file open in the desktop app's file viewer, external edits to that file on disk are not reflected in the open view. The viewer continues to show a snapshot from when the document was last navigated to. Clicking to a different document and back re-reads the file and shows current content.

This is easy to miss, because the view looks normal — there is no staleness indicator and no reload affordance. The user believes they are reading the current file.

Why it matters beyond the refresh

Agent workflows increasingly write to a file and then link the user to it for review. If the user already has that file open, the link lands them on a cached version that does not contain what was just written. The failure is silent in both directions: the user may not find content that exists, or may review and approve content that has since changed. In a long document the natural conclusion is that they simply missed it while scrolling.

Steps to reproduce

  1. Open a markdown file in the desktop app's file viewer.
  2. With the view still open, modify that file on disk (an agent edit or an external editor both work).
  3. Look at the still-open view without navigating away.

Expected: the view reflects the file on disk, or indicates it is out of date. Actual: the view shows the previous content, indefinitely.

  1. Click to another document, then back. The content is now current — which rules out filesystem sync lag as the cause.

Environment

Desktop app on Windows 11, version 2.1.219–2.1.220. Observed with a large markdown file (~460 lines) inside a cloud-synced folder; the navigate-away-and-back behaviour distinguishes this from sync lag.

its-coughfee avatar Aug 05 '26 02:08 its-coughfee

Additional data point: this is not markdown-specific. Repeating the same test with a .py file in the same folder — open it in the viewer, edit it on disk while the view stays open, then look without navigating — reproduces identically: the view continues to show the previous content until you navigate away and back.

So the cache appears to sit at the document-view level rather than in the markdown renderer. Worth noting for anyone scoping this, since the markdown-only framing in the original report points at the wrong layer.

its-coughfee avatar Aug 05 '26 03:08 its-coughfee

Flagging that I've stopped waiting on this one. Live updating is the single thing I need most — I read Markdown alongside Claude Code while it edits those same files, and a viewer that serves a stale copy makes that impossible. I'm building my own small Markdown reader for Windows instead, with live reload as its first-class feature. Leaving this open because the bug is real regardless of what I do about it.

its-coughfee avatar Aug 06 '26 06:08 its-coughfee

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Oct 06 '26 10:10 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Nov 29 '26 14:11 github-actions[bot]