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
2 bugs spotted when running Windows Desktop connects to opencode server in WSL: Shell runtime & Path Detection #8378
We're running OpenCode with a Windows desktop client(1.18&1.19) connected to a WSL server. In this configuration, we've encountered critical issues with command execution:
Primary Issue
MCP activation fails with error:
ENOENT: no such file or directory, posix_spawn 'npx'
Root Cause Analysis
After investigation, we identified two fundamental issues:
Shell Path Mismatch
All bash commands fail with ENOENT: no such file or directory, posix_spawn '/usr/bin/zsh'
The shell detection logic appears to have a bug in WSL environments
process.env.SHELL is set to /usr/bin/zsh, but this path is not accessible in the spawn context
This suggests OpenCode wasn't designed to properly handle WSL as a runtime environment
Path Conversion Bug
Client (Windows) and server (WSL) cross-platform path detection is broken
Windows paths are being redundantly appended to WSL paths
Impact
These issues make basic tool execution (shell, bash, npx) completely unusable in the WSL environment, effectively blocking MCP functionality and other command-dependent features.
We hope this provides enough context for you to investigate further.
Plugins
none
OpenCode version
1.19
Steps to reproduce
Start the server in WSL using opencode serve --port *****
Connect Desktop app to that port.
Try activate MCP servers and ask the bot to run shell commands
Screenshot and/or share link
Operating System
Windows 11 with WSL(Ubuntu 24)
Terminal
OpenCode Desktop, powershell in windows, zsh in linux
Activity
github-actions commentedon Jan 14, 2026
This issue might be a duplicate of or related to existing issues. Please check:
The core issues you've identified (shell path mismatch and path conversion bugs) align with multiple existing WSL-related problems. The cross-platform path detection issue especially mirrors #6460.
Feel free to ignore if none of these address your specific case.
github-actions commentedon Mar 27, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.