DSH Windows Open In editors
DeepSeek Harness Windows Open In: VS Code, Cursor & Electron
- Author
- DeepSeekAgent.io Editorial Team
- Published
- Updated
On DeepSeek Harness Desktop for Windows, a Workspace can be healthy and the Open In menu can detect VS Code or Cursor, yet selecting the editor immediately shows a launch failure. The editor path and Workspace may both be valid. The failure occurs when the Desktop Host passes ELECTRON_RUN_AS_NODE=1 to an external Electron application.
Status update (November 23, 2026): the fix is now included in the official v0.2.3-alpha.1 Release. rc.4 and earlier builds still contain the failure path. When using the prerelease or a Desktop Beta that bundles it, validate the installed artifact with the checks below.
That variable makes an Electron executable run in Node.js mode. VS Code, VS Code Insiders, Cursor, and Windsurf then interpret the Workspace argument as a script path and exit with MODULE_NOT_FOUND. DSH observes the non-zero exit during its launch window and returns launch-failed.
Why Explorer works while VS Code fails
File Explorer is not an Electron application, so the variable does not change its execution mode. The GitHub Desktop adapter also has a dedicated path that explicitly supplies the environment required by its CLI. The affected path is the generic launchDetachedApp used for Electron editors.
An icon in the menu proves that DSH resolved the application. It does not prove that the environment used to spawn the application is safe.
What the rc.4 release still ships
In the DSH v0.2.2-rc.4 tag, packages/host/open-in-app/src/resolver.ts still merges the parent and application-specific environments directly:
env: { ...scrubbedParentEnv(), ...options.env }
scrubbedParentEnv() primarily removes credential-shaped and DSH-specific variables. It does not automatically remove ELECTRON_RUN_AS_NODE. The rc.4 release notes list two fixes—unexpected model responses and Desktop LiveShare—and do not list the Open In editor fix.
How the fix entered v0.2.3-alpha.1
The official fix removes ELECTRON_RUN_AS_NODE from the inherited base environment before merging options.env. The order matters because a dedicated adapter such as GitHub Desktop may intentionally add the variable for its own CLI.
The official v0.2.3-alpha.1 notes explicitly list the Windows Desktop Open In fix for VS Code, Cursor, and related editors. The boundary is now clear: the rc.4 tag and package do not contain the fix, while the alpha.1 line publishes it. DSH Desktop v2.0.24-beta.2 bundles v0.2.3-alpha.2 and therefore includes the alpha.1 upstream change.
Workarounds for older builds
On rc.4 or an earlier build, bypass the generic Desktop Host application launcher:
- Run
code <workspace>in a DSH terminal, or use the CLI supplied by Cursor or Windsurf. - Open the Workspace in File Explorer and then open the directory from the editor.
- If the editor command is not on
PATH, install its Shell Command from the editor and retry.
Do not permanently add or delete ELECTRON_RUN_AS_NODE in user or system environment settings. DSH uses it internally to run a Node entry point through the packaged Electron executable. The defect is that it leaks into an unrelated GUI child.
Confirming the failure path
This diagnosis fits when:
- the Windows Desktop Open In menu detects the editor;
- File Explorer opens the same Workspace;
- VS Code, Cursor, or Windsurf fails immediately;
- the editor CLI opens the directory successfully;
- the background request returns
502 launch-failedand the editor process exits quickly.
If the editor is absent from the menu, investigate application discovery, registry entries, and install paths. If every application fails, inspect permissions and the Host process instead of assuming the Electron-variable defect.
If the failure occurs while Desktop itself updates, replaces the install directory, or requests elevation, use the DeepSeek Harness Windows updater diagnostic. See the v0.2.2-rc.4 update for the old boundary and the v0.2.3-alpha.1 update for the published fix.
Validating alpha.1 and later builds
Verify more than the version number. Confirm that launchDetachedApp in the tag or installed package removes ELECTRON_RUN_AS_NODE from inherited environment, then test VS Code, Cursor, File Explorer, and GitHub Desktop on a real Windows machine. This proves that generic Electron editors recover without breaking dedicated adapters.
References
- DSH v0.2.2-rc.4 Open In source
- DSH master Open In source
- DSH v0.2.2-rc.4 release notes
- DSH v0.2.3-alpha.1 release notes
- DSH Desktop v2.0.24-beta.2 release notes
- Community comparison of the rc.3/rc.4 packages and the master fix
FAQ
Will reinstalling rc.4 fix it?
No. The rc.4 tag and package do not contain the filtering change, so reinstalling the same build does not alter this path.
Does alpha.1 fix every Open In failure?
No. Alpha.1 fixes Electron editors failing because ELECTRON_RUN_AS_NODE leaked into the child process. Missing application discovery, invalid install paths, insufficient permissions, and Host process failures remain separate diagnoses.
Why does code <workspace> work?
The CLI invocation bypasses the Desktop Host's generic Open In child environment and therefore avoids the leaked selector.
Are macOS and Linux definitely affected?
This article covers the reproduced Windows Desktop path. Similar symptoms on other platforms require separate verification of the executable, environment, and exit code.