🐛 Windows: agent documents never mount ("invalid characters for a local volume name")#107
Merged
Merged
Conversation
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.
51c17be to
3baea24
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed that on Windows, launching an agent fails with:
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 likeC:\Users\...\documentsmatches 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 likexpressclaw-workspace-devstay 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-coreis green.