Failed to browse filesystem when /workspace contains unreadable directories
Image Variant
Full (latest / dev)
Image Tag / Version
latest
Host OS
Synology / NAS
What happened?
When trying to add a new project/workspace from the CloudCLI web UI, the filesystem browser fails with:
Failed to browse filesystem
This happens with a broad Docker workspace mount:
- /volume2/docker:/workspace
That mount is intentional: HolyClaude is used to work across multiple container/project directories on the NAS.
After adding a local diagnostic patch to expose the real backend error, the container logs showed that the browse route fails before it can browse the filesystem:
[API] Browse filesystem request for path: ~
[API] WORKSPACES_ROOT is: /workspace
Error browsing filesystem: {
message: 'expandWorkspacePath is not defined',
code: undefined,
stack: 'ReferenceError: expandWorkspacePath is not defined
at file:///usr/local/lib/node_modules/@cloudcli-ai/cloudcli/dist-server/server/index.js:189:26
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/route.js:149:13)
at authenticateToken (file:///usr/local/lib/node_modules/@cloudcli-ai/cloudcli/dist-server/server/middleware/auth.js:62:9)'
}
There is a second related issue for broad NAS/container roots: some child directories under /workspace can legitimately be unreadable or non-traversable for the runtime user. The filesystem browser should skip those entries instead of failing the entire request.
What did you expect?
The project/workspace picker should open /workspace and list the readable directories.
When the UI requests ~, it should resolve to WORKSPACES_ROOT (/workspace in this Docker image).
If some children under /workspace return EACCES, EPERM, or ENOENT, they should be skipped and the browser should continue showing the readable entries.
Steps to reproduce
- Run HolyClaude
latest/v1.3.3on Synology/NAS. - Mount a broad Docker directory as the workspace root:
- /volume2/docker:/workspace
- Open the CloudCLI web UI.
- Click to add a new project/workspace.
- Open the filesystem browser.
- The UI shows
Failed to browse filesystem.
Docker Compose / Run command
Relevant compose excerpt:
services:
holyclaude:
image: coderluii/holyclaude:latest
container_name: holyclaude
hostname: holyclaude
restart: unless-stopped
shm_size: 2g
cap_add:
- SYS_ADMIN
- SYS_PTRACE
security_opt:
- seccomp=unconfined
ports:
- "7656:3001"
volumes:
- /volume2/docker/holyclaude/data/claude:/home/claude/.claude
- /volume2/docker:/workspace
- /volume1/scripts:/workspace/scripts
- /volume2/docker/holyclaude/data/cloudcli:/home/claude/.cloudcli
- /volume2/docker/holyclaude/data/npm-global:/home/claude/.npm-global
environment:
- TZ=Europe/Paris
- PUID=1026
- PGID=101
- NODE_OPTIONS=--max-old-space-size=4096
- HOLYCLAUDE_CODEX_CHAT_PERMISSION_MODE=acceptEdits
- CHOKIDAR_USEPOLLING=1
- WATCHFILES_FORCE_POLLING=true
Logs / Error output
Relevant logs:
[API] Browse filesystem request for path: ~
[API] WORKSPACES_ROOT is: /workspace
Error browsing filesystem: {
message: 'expandWorkspacePath is not defined',
code: undefined,
stack: 'ReferenceError: expandWorkspacePath is not defined
at file:///usr/local/lib/node_modules/@cloudcli-ai/cloudcli/dist-server/server/index.js:189:26
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/route.js:149:13)
at authenticateToken (file:///usr/local/lib/node_modules/@cloudcli-ai/cloudcli/dist-server/server/middleware/auth.js:62:9)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/route.js:149:13)
at Route.dispatch (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/route.js:119:3)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/@cloudcli-ai/cloudcli/node_modules/express/lib/router/layer.js:95:5)'
Suggested fix
Define the missing expandWorkspacePath helper used by /api/browse-filesystem.
Expected behavior:
~ -> WORKSPACES_ROOT
~/foo -> path.join(WORKSPACES_ROOT, 'foo')
Also make the filesystem tree builder tolerant of unreadable child entries. While building the tree, catch per-entry filesystem errors like EACCES, EPERM, and ENOENT, return null for skipped entries, and filter nulls before sorting.
Local workaround tested
A local Docker image patch based on coderluii/holyclaude:latest fixes the issue by:
- defining
expandWorkspacePath; - catching per-entry browse errors;
- filtering skipped entries before sorting;
- exposing route error details for diagnostics.
@tchirou thanks for the detailed repro and the local workaround notes. You were right that the folder browser should treat ~ as the workspace root, and the stack trace made the actual break pretty clear.
This is fixed in v1.3.4.
The root cause was in HolyClaude's CloudCLI self-update patch, not in your compose mount. The packaged CloudCLI 1.34.0 code already had expandWorkspacePath, but HolyClaude was replacing the update route by slicing forward to /api/browse-filesystem. In the current CloudCLI layout, that accidentally removed the helper before the browse and create-folder routes could use it.
The fix changes that patch so it replaces only POST /api/system/update and leaves the workspace browsing helpers intact. I also added regression coverage against the vendored CloudCLI package so the self-update guard cannot remove expandWorkspacePath again while patching both source and runtime files.
The GitHub release and tag are live now. The Docker publish workflow for full and slim is running from that tag; when the registry finishes publishing, the updated tags are latest, 1.3.4, slim, and 1.3.4-slim.
Update with:
docker compose pull && docker compose up -d
One note for the Synology/NAS setup: broad mounts like /volume2/docker:/workspace are supported, but /workspace is the CloudCLI boundary. Anything readable under that mount can be visible to authenticated CloudCLI users, so a narrower project mount is safer when you do not want the whole folder tree exposed inside CloudCLI.
Closing this because the repo-side fix is released. If the new image still fails on that NAS layout after the Docker publish finishes, please comment with the new container logs and I will reopen it.