Skip to content

🐛 Windows: agent documents never mount ("invalid characters for a local volume name")#107

Merged
MFA-X-AI merged 1 commit into
mainfrom
fahreza/fix-windows-bind-mount
May 25, 2026
Merged

🐛 Windows: agent documents never mount ("invalid characters for a local volume name")#107
MFA-X-AI merged 1 commit into
mainfrom
fahreza/fix-windows-bind-mount

Conversation

@MFA-X-AI
Copy link
Copy Markdown
Member

@MFA-X-AI MFA-X-AI commented May 25, 2026

Noticed that on Windows, launching an agent fails with:

container error
container error: failed to create container: Docker responded with status code 400: create C:\Users\user\.xpressclaw\assistant\documents: "C:\Users\user\.xpressclaw\assistant\documents" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed.

The agent still chats, but its documents directory never mounts - chat doesn't depend on that bind, so it looks half-connected.

The cause is in docker/manager.rs: it decides named-volume vs. bind-mount by checking whether the source starts with / or ~, which is Unix-only. A Windows path like C:\Users\...\documents matches neither, so it gets sent to Docker as a named volume — and Docker rejects it, since a volume name can only be [a-zA-Z0-9][a-zA-Z0-9_.-].

A volume name can never contain a path separator or the drive-letter colon, so this PR flips the check: any source containing /, \, : (or a leading ~) is treated as a bind mount - covering Unix, C:\, C:/, and UNC - while bare names like xpressclaw-workspace-dev stay named volumes.

Verified by building the installer from this branch: the server boots clean and the documents mount no longer errors. cargo check -p xpressclaw-core is green.

The named-vs-bind heuristic only recognized Unix paths (leading / or ~), so a Windows source like C:\Users\...\documents was tagged a named volume. Docker rejected it — the path fails the [a-zA-Z0-9][a-zA-Z0-9_.-] volume-name rule — so the agent's documents directory never mounted (it still chatted because chat doesn't depend on that mount).

Detect host paths by the characters a volume name can never contain — path separators and the drive-letter colon — so C:\..., C:/..., and \unc\... all map to bind mounts while bare names like xpressclaw-workspace-dev stay named volumes.
@MFA-X-AI MFA-X-AI force-pushed the fahreza/fix-windows-bind-mount branch from 51c17be to 3baea24 Compare May 25, 2026 09:31
@MFA-X-AI MFA-X-AI merged commit 7d2cd81 into main May 25, 2026
4 checks passed
@MFA-X-AI MFA-X-AI deleted the fahreza/fix-windows-bind-mount branch May 25, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant