claude-code - 💡(How to fix) Fix [BUG] Artifacts and Scheduled Tasks fail when ~/Documents is a symlink (virtiofs cannot mkdir through symlinks) [2 comments, 3 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#55037Fetched 2026-05-01 05:47:53
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Error Message

Error seen in Artifacts: RPC error: failed to mount /mnt/.virtiofs-root/shared/Users/amanda.**/Documents/Claude/Artifacts/as .artifacts/stakeholder-pulse: source path does not exist and could not be created: mkdir /mnt/.virtiofs-root/shared/Users/amanda.*/Documents/Claude: file exists Also affects: Scheduled Tasks — same error; worked around by manually updating scheduled-tasks.json to use the resolved OneDrive path instead of the symlinked ~/Documents path.

Error Messages/Logs

Observe the "Something went wrong" RPC error Observe task fails before execution with the same virtiofs mount error

Root Cause

Two separate Claude.ai features fail with the same root cause: virtiofs (the VM filesystem layer) cannot mkdir through a symlink, so any feature that tries to create or mount a path under ~/Documents/Claude/ fails before it starts.

Fix Action

Fix / Workaround

Workaround: Manually replace /Documents/Claude/... paths with the real path (/Library/CloudStorage/OneDrive-*****/Documents 1/Claude/...) in any config files. Not possible for Artifacts — no user-accessible config.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Two separate Claude.ai features fail with the same root cause: virtiofs (the VM filesystem layer) cannot mkdir through a symlink, so any feature that tries to create or mount a path under ~/Documents/Claude/ fails before it starts.

Error seen in Artifacts:

RPC error: failed to mount /mnt/.virtiofs-root/shared/Users/amanda.**/Documents/Claude/Artifacts/as .artifacts/stakeholder-pulse: source path does not exist and could not be created: mkdir /mnt/.virtiofs-root/shared/Users/amanda.*/Documents/Claude: file exists Also affects: Scheduled Tasks — same error; worked around by manually updating scheduled-tasks.json to use the resolved OneDrive path instead of the symlinked ~/Documents path.

Root cause: virtiofs sees the Documents symlink as a file, not a directory, so mkdir on any child path fails with "file exists."

Expected behavior: Claude.ai should resolve symlinks (realpath) before constructing virtiofs mount paths.

Workaround: Manually replace /Documents/Claude/... paths with the real path (/Library/CloudStorage/OneDrive-*****/Documents 1/Claude/...) in any config files. Not possible for Artifacts — no user-accessible config.

What Should Happen?

Before constructing a virtiofs mount path, Claude should resolve any symlinks in the path to their real filesystem location (equivalent to running realpath on the path). This ensures the mount succeeds regardless of whether components like ~/Documents are symlinks.

For example, instead of mounting:

/Users/amanda.[email protected]/Documents/Claude/Artifacts/stakeholder-pulse Claude should resolve and mount:

/Users/amanda.[email protected]/Library/CloudStorage/OneDrive-Cohesity/Documents 1/Claude/Artifacts/stakeholder-pulse This would make Artifacts and Scheduled Tasks work correctly for any user whose ~/Documents (or any parent directory) is managed by OneDrive, iCloud Drive, or any other sync client that uses symlinks.

Error Messages/Logs

Steps to Reproduce

Set up OneDrive on macOS such that ~/Documents is a symlink to ~/Library/CloudStorage/OneDrive-<tenant>/Documents 1/ (this is OneDrive's default macOS configuration) Open Claude.ai web app In any conversation, create or re-open an Artifact (e.g. a stakeholder dashboard) — triggering the VM to mount ~/Documents/Claude/Artifacts/<artifact-name>/ Observe the "Something went wrong" RPC error For Scheduled Tasks (same bug, different trigger):

Same symlink setup as above Have at least one scheduled task configured (paths stored as ~/Documents/Claude/Scheduled/...) Trigger a scheduled task run Observe task fails before execution with the same virtiofs mount error Note: The symlink itself is not unusual — OneDrive creates it automatically on macOS when Documents folder sync is enabled. This likely affects any user with OneDrive (or potentially iCloud Drive) syncing their Documents folder.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Prior to v2.1.119

Claude Code Version

v2.1.119

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

Resolve symlinks in virtiofs mount paths by using the realpath equivalent before constructing the mount path.

Guidance

  • Identify and replace any symlinks in the virtiofs mount path with their real filesystem location to ensure successful mounting.
  • Manually update config files, such as scheduled-tasks.json, to use the resolved path instead of the symlinked path as a temporary workaround.
  • Verify the fix by checking if Artifacts and Scheduled Tasks work correctly after resolving the symlinks.
  • Consider implementing a permanent solution that automatically resolves symlinks in virtiofs mount paths.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a change in how virtiofs mount paths are constructed.

Notes

The issue seems to be specific to macOS users with OneDrive or potentially iCloud Drive syncing their Documents folder, which creates a symlink. The workaround may not be applicable to all users, and a permanent solution should be implemented to resolve symlinks automatically.

Recommendation

Apply workaround: Manually replace symlinked paths with their real filesystem location in config files until a permanent solution is implemented to automatically resolve symlinks in virtiofs mount paths.

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

claude-code - 💡(How to fix) Fix [BUG] Artifacts and Scheduled Tasks fail when ~/Documents is a symlink (virtiofs cannot mkdir through symlinks) [2 comments, 3 participants]