claude-code - 💡(How to fix) Fix [BUG] Scheduled Tasks fail on Windows MSIX: fs.link() crosses real ↔ virtualized filesystem boundary [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46082Fetched 2026-04-11 06:29:27
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
cross-referenced ×1

Error Message

UNKNOWN: unknown error, link 'C:\Users\lolly\Documents\Claude\Scheduled\<taskId>\SKILL.md' -> 'C:\Users\lolly\AppData\Roaming\Claude\local-agent-mode-sessions\<sessionId>\<subId>\<localId>\uploads\SKILL.md'

Root Cause

The MSIX package virtualizes AppData\Roaming into:

C:\Users\lolly\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\

The Scheduled Task runner calls fs.link() (hard link) from the real filesystem path (Documents\Claude\Scheduled\...\SKILL.md) to the non-virtualized path (AppData\Roaming\Claude\...). But AppData\Roaming\Claude does not exist as a real directory — it only exists inside the MSIX virtualized filesystem. The hard link target path is never resolved through the MSIX virtualization layer, so the operation fails.

Fix Action

Fix / Workaround

  • OS: Windows 11
  • Claude Desktop: Installed via ClaudeSetup.exe from claude.ai/download (MSIX package)
  • Package ID: Claude_pzs8sxrjxfjjc
  • Affects: All Scheduled Tasks, not just a specific one
  • Workaround: "Retry" button works (bypasses fs.link mechanism)

Code Example

UNKNOWN: unknown error, link 'C:\Users\lolly\Documents\Claude\Scheduled\<taskId>\SKILL.md' -> 'C:\Users\lolly\AppData\Roaming\Claude\local-agent-mode-sessions\<sessionId>\<subId>\<localId>\uploads\SKILL.md'

---

C:\Users\lolly\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\
RAW_BUFFERClick to expand / collapse

Bug Description

All Scheduled Tasks in Cowork fail to run on Windows when Claude Desktop is installed via the official MSIX package (which is the only installer available via claude.ai/download). The error occurs every time a task is triggered via "Run now" or on schedule.

Clicking "Retry" pastes the prompt into the input field as a regular message — and that works fine. So the task content is valid; only the automatic loading mechanism is broken.

Error Message

UNKNOWN: unknown error, link 'C:\Users\lolly\Documents\Claude\Scheduled\<taskId>\SKILL.md' -> 'C:\Users\lolly\AppData\Roaming\Claude\local-agent-mode-sessions\<sessionId>\<subId>\<localId>\uploads\SKILL.md'

Root Cause

The MSIX package virtualizes AppData\Roaming into:

C:\Users\lolly\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\

The Scheduled Task runner calls fs.link() (hard link) from the real filesystem path (Documents\Claude\Scheduled\...\SKILL.md) to the non-virtualized path (AppData\Roaming\Claude\...). But AppData\Roaming\Claude does not exist as a real directory — it only exists inside the MSIX virtualized filesystem. The hard link target path is never resolved through the MSIX virtualization layer, so the operation fails.

Diagnostic Steps Performed

  1. Confirmed SKILL.md exists at C:\Users\lolly\Documents\Claude\Scheduled\<taskId>\SKILL.md
  2. Confirmed C:\Users\lolly\AppData\Roaming\Claude\ does not exist
  3. Found actual data location: C:\Users\lolly\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\local-agent-mode-sessions\...
  4. Created a directory junction from AppData\Roaming\Claude → MSIX path — task stopped starting entirely
  5. Tried: Developer Mode enabled, Admin install, reinstall — no change
  6. "Retry" button (pasting prompt into input) works every time ✅

Suggested Fix

Replace fs.link() (hard link) with fs.copyFile() when loading SKILL.md into the session uploads directory. Hard links cannot cross filesystem boundaries, but a file copy works regardless of MSIX virtualization. Alternatively, resolve the target path through the MSIX virtualization layer before creating the link.

Environment

  • OS: Windows 11
  • Claude Desktop: Installed via ClaudeSetup.exe from claude.ai/download (MSIX package)
  • Package ID: Claude_pzs8sxrjxfjjc
  • Affects: All Scheduled Tasks, not just a specific one
  • Workaround: "Retry" button works (bypasses fs.link mechanism)

extent analysis

TL;DR

Replace fs.link() with fs.copyFile() to load SKILL.md into the session uploads directory, as hard links cannot cross filesystem boundaries.

Guidance

  • Verify that the issue is indeed caused by the MSIX package virtualizing AppData\Roaming by checking the existence of the virtualized directory.
  • Consider resolving the target path through the MSIX virtualization layer before creating the link as an alternative solution.
  • Test the fs.copyFile() approach to ensure it works regardless of MSIX virtualization.
  • If the issue persists, try to create a symbolic link instead of a hard link to see if it resolves the issue.

Example

// Replace fs.link() with fs.copyFile()
const fs = require('fs');
fs.copyFile('C:\\\\Users\\\\lolly\\\\Documents\\\\Claude\\\\Scheduled\\\\<taskId>\\\\SKILL.md', 'C:\\\\Users\\\\lolly\\\\AppData\\\\Roaming\\\\Claude\\\\local-agent-mode-sessions\\\\<sessionId>\\\\<subId>\\\\<localId>\\\\uploads\\\\SKILL.md', (err) => {
  if (err) {
    console.error(err);
  } else {
    console.log('File copied successfully');
  }
});

Notes

This solution assumes that the issue is indeed caused by the MSIX package virtualizing AppData\Roaming and that replacing fs.link() with fs.copyFile() will resolve the issue. However, further testing may be required to ensure that this solution works in all scenarios.

Recommendation

Apply the workaround by replacing fs.link() with fs.copyFile() to load SKILL.md into the session uploads directory, as this approach is more likely to work regardless of MSIX virtualization.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING