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
Windows desktop app: every sandboxed shell command fails with 0xC0000142 (STATUS_DLL_INIT_FAILED)
Summary
On Windows, the desktop app (Electron) cannot run any confined shell command. Under workspace-write (and read-only), every pwsh/cmd/git/… invocation spawned through @deepseek-ai/dsh-sandbox-windows-acl returns empty output with [exit code: 3221225794]
= 0xC0000142STATUS_DLL_INIT_FAILED. Only danger-full-access works.
Root cause: the ACL sandbox spawns children that must share the host process's console, and
the desktop Host runs under Electron as a GUI process without a console.
Environment
Windows 11 Pro for Workstations 23H2, build 22631, x64
Same failure reproduced with sandbox package 0.2.0-rc.1 (published 2026-09-28)
Account: built-in Administrator (SID …-500), UAC disabled — but this is not the cause (see isolation below; plain Node works on the same account)
Workspace on NTFS
Evidence
@deepseek-ai/dsh-sandbox-windows-acl's own README (Verified boundaries / Modes) states:
children created with CREATE_NO_WINDOW / CREATE_NEW_CONSOLE die during DLL initialization with STATUS_DLL_INIT_FAILED (0xC0000142); children share the host console …
So the sandboxed child needs the host to own a console. The desktop Host is an Electron
(ELECTRON_RUN_AS_NODE) process, which is a GUI-subsystem process with no console (and Chromium
frees any inherited console). Every confined child therefore dies during DLL init.
Minimal isolation
Same machine, same script, same package — only the host process differs. The script creates an AclSandbox (workspace-write) and spawns cmd /c echo hello:
DeepSeek Harness.exe + AllocConsole() before spawn
yes
exit=0, "hello\r\n"
init() always succeeds; only the child dies. The same happens for pwsh, git, cargo, bun.
Web/CLI version is unaffected
In an older web/CLI setup (same machine/account, workspace-write), 283 pwsh calls succeeded
with zero0xC0000142 — because that Host is node.exe (console subsystem, started from a
terminal). The desktop build is the one that breaks.
Impact
Any Windows user of the desktop app running under workspace-write or read-only gets a dead
shell tool. It is not an account/UAC/filesystem issue (the plain-Node run proves the sandbox and
machine are fine).
Suggested fix
Make the Host own a console before spawning confined children, e.g. call AllocConsole() (after FreeConsole()) once at Host startup, or spawn confined commands via a ConPTY/pseudo-console. AllocConsole() in the host was verified to make the sandbox work.
Reproduce
Install the desktop app on Windows.
Start a session and keep the default workspace-write permission mode.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Windows desktop app: every sandboxed shell command fails with
0xC0000142(STATUS_DLL_INIT_FAILED)Summary
On Windows, the desktop app (Electron) cannot run any confined shell command. Under
workspace-write(andread-only), everypwsh/cmd/git/… invocation spawned through@deepseek-ai/dsh-sandbox-windows-aclreturns empty output with[exit code: 3221225794]=
0xC0000142STATUS_DLL_INIT_FAILED. Onlydanger-full-accessworks.Root cause: the ACL sandbox spawns children that must share the host process's console, and
the desktop Host runs under Electron as a GUI process without a console.
Environment
…-500), UAC disabled — but this is not the cause (see isolation below; plain Node works on the same account)Evidence
@deepseek-ai/dsh-sandbox-windows-acl's own README (Verified boundaries / Modes) states:So the sandboxed child needs the host to own a console. The desktop Host is an Electron
(
ELECTRON_RUN_AS_NODE) process, which is a GUI-subsystem process with no console (and Chromiumfrees any inherited console). Every confined child therefore dies during DLL init.
Minimal isolation
Same machine, same script, same package — only the host process differs. The script creates an
AclSandbox(workspace-write) and spawnscmd /c echo hello:node.exe(v24.19.0)exit=0,"hello\r\n"DeepSeek Harness.exewithELECTRON_RUN_AS_NODE=1exit=3221225794DeepSeek Harness.exe+AllocConsole()before spawnexit=0,"hello\r\n"init()always succeeds; only the child dies. The same happens forpwsh,git,cargo,bun.Web/CLI version is unaffected
In an older web/CLI setup (same machine/account,
workspace-write), 283pwshcalls succeededwith zero
0xC0000142— because that Host isnode.exe(console subsystem, started from aterminal). The desktop build is the one that breaks.
Impact
Any Windows user of the desktop app running under
workspace-writeorread-onlygets a deadshell tool. It is not an account/UAC/filesystem issue (the plain-Node run proves the sandbox and
machine are fine).
Suggested fix
Make the Host own a console before spawning confined children, e.g. call
AllocConsole()(afterFreeConsole()) once at Host startup, or spawn confined commands via a ConPTY/pseudo-console.AllocConsole()in the host was verified to make the sandbox work.Reproduce
workspace-writepermission mode.(no output)/[exit code: 3221225794].All reactions