[BUG] Title: PDF preview pane doesn't refresh when a file is overwritten at the same path
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment
Platform: Windows 11
Client: Claude Code (desktop)
File type: PDF (also likely applies to other previewable files)
Description When a PDF file is regenerated/overwritten at the exact same file path (e.g. after asking Claude to fix content in the PDF), the preview pane on the right continues to display the previous, stale version of the file instead of the updated one. This happens even after the file's content and last-modified timestamp on disk have genuinely changed.
What Should Happen?
Expected behavior The preview pane should detect that the file content changed (e.g. by comparing last-modified time or content hash) and re-render it.
Actual behavior The preview pane appears to cache by file path only, not by content, so it keeps showing the stale render.
Workaround found Renaming the file (e.g. report.pdf → report_v2.pdf) and re-sending it forces the preview pane to render the new content correctly. This confirms the underlying file was in fact updated — only the preview was stale.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
- Have Claude generate a PDF and display it in the preview pane (e.g. via a "send file" action).
- Ask Claude to fix something visible in the PDF (e.g. a rendering glitch).
- Claude regenerates the file at the same path and re-sends it.
- The preview pane still shows the old version — the fix is not visible.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.26832.0 (056ee2) 2026-08-06T05:43:05.000Z
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Additional context This was reproduced twice in a row with the same file path before switching to a renamed file resolved it.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗