claude-code - 💡(How to fix) Fix Cowork slash commands fail on corporate Macs where ~/Documents is a OneDrive symlink (virtiofs mount error) [1 comments, 2 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#52991Fetched 2026-04-25 06:15:19
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

RPC error: failed to mount /mnt/.virtiofs-root/shared/Users/<user>/Documents/Claude/Artifacts/<command> as .artifacts/<command>: source path does not exist and could not be created: /mnt/.virtiofs-root/shared/Users/<user>/Documents/Claude/Artifacts/<command>: mkdir /mnt/.virtiofs-root/shared/Users/<user>/Documents: file exists

Root Cause

The virtiofs virtual filesystem mounts host paths into the VM for artifact access. When it tries to mkdir /mnt/.virtiofs-root/shared/Users/<user>/Documents, it fails because that path already exists as a symlink (not a real directory) in the host filesystem. virtiofs cannot follow symlinks when creating intermediate directories, so the mount fails entirely.

Note: The error says "file exists" — this is misleading. The path exists but as a symlink, not a real directory, which virtiofs treats as an untraversable file.

Fix Action

Fix / Workaround

Why This Is Widespread

  • OneDrive folder backup for ~/Documents and ~/Desktop is the default IT policy at most large enterprises
  • IT admins lock this setting (the toggle is greyed out with message: "Your IT department does not allow you to stop folder backup")
  • Users have no self-service workaround — it requires an IT ticket or a non-corporate Mac
  • This blocks cowork entirely for corporate users, who are the primary target audience for cowork

Code Example

RPC error: failed to mount /mnt/.virtiofs-root/shared/Users/<user>/Documents/Claude/Artifacts/<command> as .artifacts/<command>: source path does not exist and could not be created: /mnt/.virtiofs-root/shared/Users/<user>/Documents/Claude/Artifacts/<command>: mkdir /mnt/.virtiofs-root/shared/Users/<user>/Documents: file exists
RAW_BUFFERClick to expand / collapse

Environment

  • macOS 15.x (Sequoia)
  • Claude Desktop app (latest stable)
  • Corporate Mac with Microsoft OneDrive managing ~/Documents via IT policy
  • ~/Documents is a symlink → /Users/<user>/Library/CloudStorage/OneDrive-<org>/Documents

Steps to Reproduce

  1. Be on a corporate Mac where IT has enabled OneDrive folder backup for Documents
  2. Verify: ls -la ~/Documents shows a symlink to OneDrive CloudStorage
  3. Open Claude Desktop app → cowork mode
  4. Run any slash command that produces artifacts (e.g. /sfdc-account-summary <account>)

Expected Behavior

Slash command executes and produces output artifacts.

Actual Behavior

Hard failure with RPC error:

RPC error: failed to mount /mnt/.virtiofs-root/shared/Users/<user>/Documents/Claude/Artifacts/<command> as .artifacts/<command>: source path does not exist and could not be created: /mnt/.virtiofs-root/shared/Users/<user>/Documents/Claude/Artifacts/<command>: mkdir /mnt/.virtiofs-root/shared/Users/<user>/Documents: file exists

Root Cause Analysis

The virtiofs virtual filesystem mounts host paths into the VM for artifact access. When it tries to mkdir /mnt/.virtiofs-root/shared/Users/<user>/Documents, it fails because that path already exists as a symlink (not a real directory) in the host filesystem. virtiofs cannot follow symlinks when creating intermediate directories, so the mount fails entirely.

Note: The error says "file exists" — this is misleading. The path exists but as a symlink, not a real directory, which virtiofs treats as an untraversable file.

Why This Is Widespread

  • OneDrive folder backup for ~/Documents and ~/Desktop is the default IT policy at most large enterprises
  • IT admins lock this setting (the toggle is greyed out with message: "Your IT department does not allow you to stop folder backup")
  • Users have no self-service workaround — it requires an IT ticket or a non-corporate Mac
  • This blocks cowork entirely for corporate users, who are the primary target audience for cowork

Suggested Fix

Change the artifacts base path from ~/Documents/Claude/Artifacts to a location that is always a real directory, such as:

  • ~/Library/Application Support/Claude/Artifacts (preferred — never symlinked by OneDrive/IT)
  • Or: resolve symlinks before attempting virtiofs mount

extent analysis

TL;DR

Change the artifacts base path from ~/Documents/Claude/Artifacts to a location that is always a real directory, such as ~/Library/Application Support/Claude/Artifacts, to resolve the RPC error caused by virtiofs inability to follow symlinks.

Guidance

  • Identify a suitable alternative directory that is not managed by OneDrive or subject to symlinking, such as ~/Library/Application Support/Claude/Artifacts.
  • Update the Claude Desktop app configuration to use the new artifacts base path.
  • Verify that the new path is a real directory and not a symlink by running ls -la on the target directory.
  • Test the slash command again to ensure the RPC error is resolved.

Example

No code snippet is provided as the issue is related to configuration and file system management.

Notes

This solution assumes that the Claude Desktop app allows configuration of the artifacts base path. If this is not possible, an alternative solution may be required, such as resolving symlinks before attempting virtiofs mount.

Recommendation

Apply workaround: Change the artifacts base path to a location that is always a real directory, such as ~/Library/Application Support/Claude/Artifacts, as this is a straightforward and effective solution to the problem.

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