New WSL session uses wrong path, causing early read/shell failures #4003

Open
opened 2026-02-16 17:42:15 -05:00 by yindo · 0 comments
Owner

Originally created by @filipsobol on GitHub (Dec 30, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

When starting a new session in a WSL project, the first few read and shell operations fail because they’re executed against an incorrect path.

Expected
Operations should use the UNC WSL path:

  • \\wsl.localhost\<DISTRO>\home\<USER>\<PATH>

Actual
The first few operations attempt to run in:

  • \home\<USER>\<PATH>

Impact
The initial read/shell operations fail until the model figures out correct pwd.

OpenCode version

v1.0.215

Steps to reproduce

  1. Install OpenCode on a Windows host.
  2. Open a project in WSL.
  3. Ask the model to do something in a specific file.

Gemini 3 Flash fails (almost?) every time.
Claude Sonnet 4.5 and GLM-4.7 fail too (I tested it only once).

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Originally created by @filipsobol on GitHub (Dec 30, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description When starting a new session in a WSL project, the first few read and shell operations fail because they’re executed against an incorrect path. **Expected** Operations should use the UNC WSL path: - `\\wsl.localhost\<DISTRO>\home\<USER>\<PATH>` **Actual** The first few operations attempt to run in: - `\home\<USER>\<PATH>` **Impact** The initial read/shell operations fail until the model figures out correct `pwd`. ### OpenCode version v1.0.215 ### Steps to reproduce 1. Install OpenCode on a Windows host. 2. Open a project in WSL. 3. Ask the model to do something in a specific file. Gemini 3 Flash fails (almost?) every time. Claude Sonnet 4.5 and GLM-4.7 fail too (I tested it only once). ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal _No response_
yindo added the windowsbug labels 2026-02-16 17:42:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4003