Cowork scheduled tasks fail with EXDEV on Windows when Documents folder is on a different drive
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?
When a Cowork scheduled task runs, the runtime tries to make SKILL.md available in the session by creating a hard link from the scheduled tasks folder (on D:, via OneDrive Known Folder Move) to the Claude AppData uploads folder (on C:). Hard links cannot cross drive boundaries on Windows, so the task fails immediately with EXDEV and never starts. There is no in-app error notification.
What Should Happen?
The scheduled task should start and execute normally. SKILL.md should be made available to the session via a file read rather than a hard link, which works across drives.
Error Messages/Logs
EXDEV: cross-device link not permitted, link 'D:\OneDrive\Documents\Claude\Scheduled\daily-krisp-meeting-reports\SKILL.md' -> 'C:\Users\natn\AppData\Roaming\Claude\local-agent-mode-sessions\4958f595-10a6-4fea-90a9-63b70ac155ba\6c118f84-fb65-4d25-9fd2-609633535a56\local_3f8bce9a-8f26-4aa1-b37e-32477675d08f\uploads\SKILL.md'
Steps to Reproduce
- Enable OneDrive Known Folder Move for Documents (moves Documents folder to D:\)
- Create any Cowork scheduled task -- Cowork stores it at D:\OneDrive\Documents\Claude\Scheduled\<task-name>\SKILL.md
- Run the scheduled task (via Run now or wait for cron)
- Task fails immediately with EXDEV -- session never starts
Claude Model
N/A
Is this a regression?
Yes, this worked in a previous version
Claude Code Version
Latest (Windows 11 Pro, Claude Desktop)
Platform
Windows
Operating System
Windows 11 Pro
Terminal/Shell
N/A (Claude Desktop / Cowork)
Additional Information
Root cause: Cowork uses fs.link() to make SKILL.md available in the session uploads folder. Hard links cannot span drive boundaries on Windows. This is deterministic for any user whose Documents folder is on a different drive than AppData.
This is distinct from the VHDX EXDEV issues (#27897, #25476): those use fs.rename() on the VM bundle at startup. This variant uses fs.link() on SKILL.md at task execution time, after Cowork is fully running.
Proposed fix:
- Option A (preferred): Read SKILL.md content directly from the source path rather than linking it
- Option B: EXDEV-safe fallback -- catch EXDEV from
fs.link()and fall back tofs.copyFile() - Option C: Store scheduled tasks in
%APPDATA%\Claude\Scheduled\instead ofDocuments\Claude\Scheduled\(same drive as AppData)
Impact: Any user with OneDrive Known Folder Move enabled (common in enterprise Microsoft 365 deployments) cannot run scheduled tasks at all.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗