[BUG] Cannot attach files from Google Drive mounted drive (G:) — EXDEV cross-device link error on Windows
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?
<img width="735" height="295" alt="Image" src="https://github.com/user-attachments/assets/089357ac-36b7-4fc3-98a5-697a5fba5be2" />
Describe the bug: When attaching a PDF file from a Google Drive mounted drive (G:) in Claude Desktop (Cowork), the attachment fails with an EXDEV cross-device link error. Image files from the same G: drive location attach and display correctly.
Error message:
EXDEV: cross-device link not permitted, link 'G:\My Drive\Business\Enigma\Decks - Enigma\Enigma Jamaica Deck Update Q4 2025\Enigma Jamaica Investor Deck - Q4 2025.pdf' ->
'C:\Users\sdcat\AppData\Roaming\Claude\local-agent-mode-sessions\[session-id]\uploads\Enigma Jamaica Investor Deck - Q4 2025.pdf'
Root cause hypothesis:
Images are embedded as base64 directly into the conversation — no filesystem operation required. PDFs are handled differently: Cowork attempts to create a hard link from the G: source path to a local session uploads folder on C:. Windows does not permit hard links across different drive letters. The fix is to use fs.copyFile() instead of fs.link() in the PDF upload handler when source and destination are on different devices.
What Should Happen?
Expected behavior:
PDFs from G: drive attach successfully, consistent with image behavior.
Error Messages/Logs
EXDEV: cross-device link not permitted, link 'G:\My Drive\Business\Enigma\Decks - Enigma\Enigma Jamaica Deck Update Q4 2025\Enigma Jamaica Investor Deck - Q4 2025.pdf' ->
'C:\Users\sdcat\AppData\Roaming\Claude\local-agent-mode-sessions\[session-id]\uploads\Enigma Jamaica Investor Deck - Q4 2025.pdf'
Steps to Reproduce
Steps to reproduce:
- Mount Google Drive via Google Drive for Desktop (appears as G: on Windows)
- Open Claude Desktop (Cowork)
- Attempt to attach a PDF file from G:\My Drive...
- Observe EXDEV error and "Something went wrong" message
- Attempt to attach an image file from the same G: location — succeeds without error
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Desktop version: v2.1.92
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Related issue: #44407 — Google Drive connector "not connected" state after disconnect/reconnect cycle. This EXDEV error was encountered as a workaround attempt when the native connector was unavailable.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗