mirror of
https://github.com/aaddrick/claude-desktop-debian.git
synced 2026-05-17 08:36:35 +03:00
The cowork-vm-service daemon was stripping --plugin-dir and --add-dir
CLI args containing VM guest paths (/sessions/{id}/mnt/{name}/...),
which prevented Claude Code from finding skills and plugins.
The fix translates guest paths to host paths using the additionalMounts
object already present in Electron's spawn params, eliminating the need
for external files like .cowork-mounts.json.
Changes to scripts/cowork-vm-service.js:
- Add translateGuestPath() with path traversal prevention
- Add buildMountMap() merging additionalMounts + mountBinds, rejecting
paths that escape the home directory
- Refactor cleanSpawnArgs() to translate instead of strip guest paths
- Refactor buildSpawnEnv() to translate CLAUDE_CONFIG_DIR
- Refactor resolveWorkDir() to translate guest cwd
- Add resolvePluginRoot() to find plugin root from skills/ subdirectory
- Update _prepareSpawn() to build and store mount map
- Update readFile() to translate guest paths
- Update BwrapBackend.spawn() to bind-mount validated mountMap dirs
- Redact env block from request logs (may contain API keys)
Fixes #265
Co-Authored-By: Claude <claude@anthropic.com>