You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
File visibility, permissions, and Git worktree path issues when operating on Windows mounted directories (/mnt/...) via WSL #16991
Description
According to the official documentation and best practices of opencode, it is recommended to install the tool in a Linux environment for the best experience. For Windows users, the official recommendation is to use WSL.
However, I am currently facing an issue regarding cross-file-system operations. My project is located in a Windows directory (e.g., drive D:\), and I am accessing it via the mounted path in WSL (e.g., /mnt/d/...).
When opencode performs operations in this mounted directory, I encounter the following problems:
File Visibility: Newly created files by the agent sometimes cannot be found directly or immediately in the Windows directory.
Permission Inconsistencies: There seem to be permission conflicts (POSIX vs NTFS), leading to occasional errors when the agent tries to read/write.
Git Worktree Path Resolution: When the agent creates a git worktree in the mounted directory, it becomes unusable/unviewable on the Windows side. Because it is created inside WSL, the worktree's internal .git configuration stores the absolute WSL path (/mnt/d/...) instead of the Windows path (D:\...). As a result, Windows-based Git clients and editors fail to recognize the paths.
Environment
OS: Windows 11 with WSL2 (Ubuntu)
Project Location: Windows native drive (accessed via /mnt/d/... in WSL)
Questions
How can I handle the git worktree path mismatch between WSL and Windows? Is there a recommended way to force relative paths or map the paths correctly so that both systems can recognize the worktree?
If my workflow requires keeping the project in the Windows directory, what is the best practice or recommended configuration (e.g., modifying wsl.conf or Git settings) to resolve these issues?
Any guidance or suggestions would be greatly appreciated. Thank you!
Activity
thenie1221 commentedon Apr 6, 2026
I have the same question.
rekram1-node commentedon Jun 23, 2026
Automated: closing question issues.
GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.
If this is a bug or feature request, please open a new issue with the appropriate template.