Repository navigation
[Баг] Windows: команды в workspace-write падают с 0xC0000142, в полном доступе работают #10971
Replies: 3 comments
Root cause found: workspace-write restricted token's default DACL names a restricting-only SIDEnvironment
Symptom Under Minimal reproduction Calling const sb = new AclSandbox({
writableDirs: [ws],
tempDir: null,
writeSid: workspaceWriteSid(ws), // or another SID
mode: 'workspace-write',
manageDacls: false,
})
await sb.init()
const child = sb.spawn({ command: 'cmd.exe', args: ['/c', 'echo', 'x'], stdio: 'piped' })
console.log((await child.wait()).exitCode)
The same failure occurs when the runner uses Why
findLogonSid(...) // later
setTokenDefaultDaclGrant(api, restrictedToken, this.tempWriteSidPtr ?? this.writeSidPtr ?? worldSid)
The package comment says this was verified on Windows 11 26200. This host is 26300, so either a Windows behavior change exposed it or the bug was latent. Suggested fix Add a SID that is present in both lists — ideally the logon SID that Until this is fixed, the practical workaround is |
|
I always got these errors too despite dsh is set to use "Workspace Write": Edit I must re-run the edit operation, but this time I need to specify sandbox_permissions: "workspace-write" to allow the modification, even if it feels like a minor change. I will re-issue the edit command exactly as before, ensuring the sandbox_permissions flag is included. This should resolve the immediate technical roadblock. |
|
Adding cross-version and cross-OS data points for the same symptom. No new analysis — Environment where it reproduces
So this is not specific to Windows 11 26H2 / It is long-standing rather than introduced in rc.3 Same failure on
Unchanged sizes and an unchanged content-hash chunk name mean the implementation did Three more small confirmations on this host
I have not re-tested One UX note seconding yours: the tool surfaces only the bare exit code, with no |
Uh oh!
There was an error while loading. Please reload this page.
Проблема: на Windows в режиме Permission = Workspace Write любая команда агента
завершается кодом 3221225794 (0xC0000142) без вывода. Если переключить Permission
на полный доступ и начать новую сессию — те же команды работают. Это известный баг
песочницы или что-то в конфигурации?
Окружение
Шаги воспроизведения
echo testФактический результат
[exit code: 3221225794] — 0xC0000142, пустой stdout/stderr.
То же самое для
whoami,Get-Locationи любой другой команды.Ожидаемый результат
Команда выполняется в песочнице и возвращает обычный вывод и код.
Контрольный опыт (та же машина, те же бинарники, Permission = полный доступ,
новая сессия):
echo testnode -v/npm -vexecSync('echo hello')Дополнительно
pwsh.exeв системеотсутствовал — значит дело не в поиске бинарника.
pwsh.exeи
DeepSeek Harness.exe.и корректно ограничены — падает именно создание процессов.
упала песочница.
Вероятная причина: процесс создаётся, но умирает при инициализации DLL,
то есть виноват лаунчер песочницы Windows, а не PowerShell.
Просьба: подскажите, известный ли это баг и есть ли обходной путь, кроме
постоянного включения полного доступа.
All reactions