Opened documents show stale version after amendment
Summary
When Claude Code amends a document (PDF, Word, Excel) and opens it via open command, the application frequently displays an older/cached version of the file rather than the latest amended version. The user has to manually close the document and ask Claude to reopen it to see the current version.
Steps to Reproduce
- Have Claude generate or amend a document (e.g., Excel file at
/tmp/example.xlsx) - Claude opens the file with
open /tmp/example.xlsx - Make further amendments to the same file path (overwrite with updated content)
- Claude runs
open /tmp/example.xlsxagain - The application (Excel, Preview, Word) shows the previous version, not the newly written file
Expected Behaviour
The most recently written version of the file should be displayed when opened.
Actual Behaviour
The previously cached/opened version is displayed. Requires the user to ask Claude to quit the application and reopen, or manually close and reopen themselves.
Workaround
Currently using osascript -e 'tell application "Microsoft Excel" to quit' (or equivalent) followed by a sleep and then open to force a fresh open. This works but shouldn't be necessary.
Environment
- macOS (Darwin 25.3.0)
- Claude Code CLI
- Affects: Excel (.xlsx), Word (.docx), Preview (.pdf) — observed across multiple file types
- Experienced multiple times in a single session
Impact
Causes confusion and wasted time as the user reviews outdated content thinking it's the latest version, then has to go back and forth to get the correct file open.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗