[BUG] Scheduled task creation fails on Windows with UNC-redirected Documents folder
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?
Creating scheduled tasks in Cowork mode fails with "Invalid file path: path traversal detected" when the Windows "My Documents" folder is redirected to a UNC/DFS network path. The path validation logic incorrectly flags the \\ UNC prefix as a path traversal attempt.
What Should Happen?
The scheduled task should be created successfully. The SKILL.md file should be written to <Documents>\Claude\Scheduled\<taskId>\SKILL.md regardless of whether the Documents path resolves to a local drive or a UNC share.
Error Messages/Logs
Every attempt fails with:
[error] [ScheduledTasksMcpServer] Failed to create scheduled task: Invalid file path: path traversal detected
Stack trace points to path validation in the bundled app code:
Error: Invalid file path: path traversal detected
at Lce (<drv>:\Program Files\WindowsApps\Claude_1.5354.0.0_x64__pzs8sxrjxfjjc\app\resources\app.asar\.vite\build ...
at async yTn (...)
at async _sr.executeToolHandler (...)
Three consecutive attempts all failed identically (timestamps 15:44:00, 15:44:17, 15:47:21 local time on 2026-06-12).
Steps to Reproduce
- Use Claude Desktop on a Windows machine where "My Documents" is folder-redirected to a UNC path (common in enterprise environments with DFS).
- In Cowork mode, attempt to create a scheduled task (e.g. via the
create_scheduled_taskMCP tool or thescheduleskill). - The task creation fails immediately.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Desktop: v1.5354.0 (MSIX package)
Platform
Google Vertex AI
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Environment
- Claude Desktop: v1.5354.0 (MSIX package)
- OS: Windows 11 Enterprise (Build 26100)
- Architecture: x64
- Electron: 41.3.0
- Claude Code SDK: 2.1.121
- Machine: Domain-joined enterprise workstation
- Documents folder: Redirected via Group Policy to a DFS share (
\\domain.dom\dfs1\home\<user>\My Documents)
Analysis
Scheduled tasks are stored under the user's Documents folder. On this machine, Windows resolves that to a UNC path such as \\domain.dom\dfs1\home\<user>\My Documents\Claude\Scheduled\. The \\ prefix at the start of a UNC path is being caught by a path traversal check (likely a regex or .. / \\ guard in function Lce), causing the write to be rejected before it reaches the filesystem.
This is a false positive — the path is not a traversal attempt, it is the legitimate resolved location of a standard Windows known folder.
Related issues
- #56636 — "Cannot add UNC network path as project folder on Windows." UNC paths are rejected by path validation. Regression since v2.1.81. References #45297, #29935, #44152.
- #43197 — "Claude CoWork does not support Windows 11 setups w/ two hard drives and Documents on the D:\ drive." Scheduled tasks/skills fail when Documents is on a non-C: volume due to cross-device hard-link limitation. Same family of bugs — the app assumes Documents is a local path on the same volume as AppData.
This issue sits at the intersection of both: scheduled task creation specifically fails because the Documents path resolves to a UNC share, triggering a false-positive path traversal rejection.
Suggested fix
When resolving the scheduled tasks storage directory, validate the final resolved path against the expected base directory rather than pattern-matching for \\ or similar sequences. UNC paths (\\server\share\...) are valid and common in enterprise Windows environments where folder redirection is configured via Group Policy.
Alternatively, consider storing scheduled tasks under %LOCALAPPDATA% (e.g. alongside other Claude app data in AppData\Local\Claude-3p\) instead of Documents, since %LOCALAPPDATA% is almost never redirected to a network share.
Attached logs
Full log bundle exported from Claude Desktop on 2026-06-12T13:48:14Z is available on request.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗