Skip to content

WSL2/VS Code integration stopped working: Editor context (/editor, focus, selections) is not syncing with OpenCode session #29570

@dkornilove

Description

@dkornilove

Description

I am running opencode inside a WSL2 (Ubuntu, Zsh) environment. Yesterday, everything worked perfectly: when I opened a WSL-hosted project in VS Code, focused files and code selections were automatically attached to the active OpenCode terminal session context.

However, today the integration suddenly stopped working. Neither focused files nor code selections are being attached to the session anymore. Additionally, the /editor command does not respond at all (nothing happens when executed).

I am completely unsure how this happened or how to properly debug it.

Steps I've Taken So Far (What didn't help):

  1. Full Reinstallation: Completely reinstalled opencode via the bash script. The issue persists.
  2. Manual Extension Installation: Manually installed the VS Code extension ([sst-dev.opencode](https://marketplace.visualstudio.com/items?itemName=sst-dev.opencode)). Even when initiating the terminal session via this extension, the editor context still fails to sync.
  3. Log Check: Checked the logs in ~/.local/share/opencode/log/, but couldn't find anything useful or relevant to this issue.
  4. VS Code Extension Host Logs: Checked the Log (Extension Host) output channel inside VS Code while attempting to launch opencode and trigger the context sharing, but it doesn't show any useful errors or warnings.
  5. Environment Check: Verified that the integrated terminal recognizes VS Code. Running echo $TERM_PROGRAM correctly outputs vscode.
  6. Deleted ~/.vscode-server - not helped

  • Where should I look to find internal communication logs between the VS Code extension and the OpenCode CLI/daemon?
  • Are there any specific network ports, sockets, or environment variables that might be blocked or misconfigured between WSL2 and VS Code?
  • What are the recommended steps to debug this behavior? Any guidance on "where to dig" would be highly appreciated.

Plugins

default

OpenCode version

1.15.10

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

wsl

Terminal

zsh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions