Skip to content

Windows sandbox setup fails with error 32 on node_repl.exe #52172

Open

Description

@Ricardo1884

What version of the Codex App are you using (From “About Codex” dialog)?

26.1002.52244

What subscription do you have?

[email protected]

What platform is your computer?

Windows

What issue are you seeing?

Diagnostico de inicializacao do Codex no Windows - 08/10/2026
Horario confirmado: 13:47:50 America/Sao_Paulo

Ferramentas afetadas: terminal restrito e node_repl/controle do Windows.
Erro: helper_unknown_error: setup refresh had errors.
Causa registrada: runtime read/execute validation failed ao configurar acesso a node_repl.exe; open ACL target for root-only update; arquivo usado por outro processo (os error 32).
Runtime afetado: cua_node/3dd31cfff853001c/bin/node_repl.exe.

Tentativas sem sucesso:

  • reiniciar a sessao node_repl;
  • fechar e reabrir o aplicativo;
  • reiniciar o Windows;
  • fechar o Codex e encerrar seus processos node_repl.exe pelo operador.

Apos a ultima limpeza, foram observados novos processos node_repl.exe criados as 13:46:37 e o erro reapareceu as 13:47:50.
Comandos aprovados fora do sandbox continuam funcionando; ferramentas restritas nao inicializam.
Nao foram alteradas permissoes, configuracoes de seguranca, fluxos do PAD ou projetos durante o diagnostico.

Solicitacao ao suporte: orientar recuperacao do runtime/setup do sandbox, preservando as restricoes de seguranca e o historico do projeto.

What steps can reproduce the bug?

Diagnostico de inicializacao do Codex no Windows - 08/10/2026
Horario confirmado: 13:47:50 America/Sao_Paulo

Ferramentas afetadas: terminal restrito e node_repl/controle do Windows.
Erro: helper_unknown_error: setup refresh had errors.
Causa registrada: runtime read/execute validation failed ao configurar acesso a node_repl.exe; open ACL target for root-only update; arquivo usado por outro processo (os error 32).
Runtime afetado: cua_node/3dd31cfff853001c/bin/node_repl.exe.

Tentativas sem sucesso:

  • reiniciar a sessao node_repl;
  • fechar e reabrir o aplicativo;
  • reiniciar o Windows;
  • fechar o Codex e encerrar seus processos node_repl.exe pelo operador.

Apos a ultima limpeza, foram observados novos processos node_repl.exe criados as 13:46:37 e o erro reapareceu as 13:47:50.
Comandos aprovados fora do sandbox continuam funcionando; ferramentas restritas nao inicializam.
Nao foram alteradas permissoes, configuracoes de seguranca, fluxos do PAD ou projetos durante o diagnostico.

Solicitacao ao suporte: orientar recuperacao do runtime/setup do sandbox, preservando as restricoes de seguranca e o historico do projeto.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    app
    on Oct 8, 2026
  2. added
    bug
    windows-os
    sandbox
    on Oct 8, 2026
  3. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    English translation:

    What version of the Codex App are you using (From “About Codex” dialog)?

    26.1002.52244

    What subscription do you have?

    [email protected]

    What platform is your computer?

    Windows

    What issue are you seeing?

    Codex startup diagnostics on Windows - 08/10/2026
    Confirmed time: 13:47:50 America/Sao_Paulo

    Affected tools: restricted terminal and node_repl/Windows control.
    Error: helper_unknown_error: setup refresh had errors.
    Recorded cause: runtime read/execute validation failed while configuring access to node_repl.exe; open ACL target for root-only update; file in use by another process (os error 32).
    Affected runtime: cua_node/3dd31cfff853001c/bin/node_repl.exe.

    Unsuccessful attempts:

    • restarting the node_repl session;
    • closing and reopening the application;
    • restarting Windows;
    • having the operator close Codex and terminate its node_repl.exe processes.

    After the last cleanup, new node_repl.exe processes were observed to have been created at 13:46:37, and the error reappeared at 13:47:50.
    Approved commands outside the sandbox continue to work; restricted tools do not initialize.
    No permissions, security settings, PAD flows, or projects were changed during the diagnostics.

    Request to support: provide guidance on recovering the sandbox runtime/setup while preserving security restrictions and project history.

    What steps can reproduce the bug?

    Codex startup diagnostics on Windows - 08/10/2026
    Confirmed time: 13:47:50 America/Sao_Paulo

    Affected tools: restricted terminal and node_repl/Windows control.
    Error: helper_unknown_error: setup refresh had errors.
    Recorded cause: runtime read/execute validation failed while configuring access to node_repl.exe; open ACL target for root-only update; file in use by another process (os error 32).
    Affected runtime: cua_node/3dd31cfff853001c/bin/node_repl.exe.

    Unsuccessful attempts:

    • restarting the node_repl session;
    • closing and reopening the application;
    • restarting Windows;
    • having the operator close Codex and terminate its node_repl.exe processes.

    After the last cleanup, new node_repl.exe processes were observed to have been created at 13:46:37, and the error reappeared at 13:47:50.
    Approved commands outside the sandbox continue to work; restricted tools do not initialize.
    No permissions, security settings, PAD flows, or projects were changed during the diagnostics.

    Request to support: provide guidance on recovering the sandbox runtime/setup while preserving security restrictions and project history.

    What is the expected behavior?

    No response

    Additional information

    No response

  4. hliu0712 commented on Oct 9, 2026

    @hliu0712

    Additional affected-user report with matching app version and runtime hash. The observations below were collected by the reporter; raw logs are not attached to this comment.

    Environment

    • Codex Windows app: 26.1002.52244
    • MSIX package: OpenAI.Codex_26.1002.7124.0_x64__2p2nqsd0c76g0
    • Bundled CLI: codex-cli 0.162.0-alpha.2
    • CUA runtime: cua_node/3dd31cfff853001c
    • Configuration: [windows] sandbox = "elevated"
    • Exact Windows edition/build: not supplied.

    Symptoms and log excerpt

    Computer use / cua.getState() fails with helper_unknown_error. The sandbox provisioning failure appears to affect the Windows restricted-token sandbox more broadly.

    runtime read/execute validation failed: validate runtime read/execute access on
      <LOCALAPPDATA>\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
      open ACL target for root-only update: 另一个程序正在使用此文件 (os error 32)
    

    English translation of the OS message: “Another program is using this file.”

    ~/.codex/.sandbox/setup_error.json:

    {"code":"helper_unknown_error","message":"setup refresh had errors"}

    Reported observations

    • Across 14 log files dated July 12–October 6, 2026, the runtime validation step appeared zero times. In October 8 logs it appeared 130 times; all 44 examined setup refreshes failed.
    • The first observed occurrence coincided with installation of the new runtime at 22:38 on October 8 (timezone not recorded in the supplied summary). This suggests a regression, but does not establish the exact upstream change.
    • After exiting Codex, PowerShell Set-Acl on the same node_repl.exe succeeded while Huorong antivirus remained running. This supports a process-lifetime/file-sharing conflict and weakens an antivirus-only explanation; it does not independently identify the conflicting handle.
    • The executable already had an inherited CodexSandboxUsers: ReadAndExecute ACE.
    • Restarts and process termination did not provide a lasting fix in this affected setup.

    Working mitigation in this environment

    The reporter changed ~/.codex/config.toml to:

    [windows]
    sandbox = "unelevated"

    and removed the residual ~/.codex/.sandbox/setup_error.json.

    After those changes:

    codex sandbox -- cmd /c "echo sandbox-ok"
    exit=0
    

    New logs contained zero runtime validation failures. Both changes were reported as necessary in this environment because the residual error state continued to surface otherwise. This is a local workaround observation, not a general guarantee about the unelevated path or confirmation that computer use was separately retested.

    Suspected cause and potential fixes

    The observed failure is consistent with sandbox refresh attempting an ACL operation on a runtime executable already in use by Codex. The exact file-opening access/share flags and startup ordering need upstream verification; this report does not claim that Windows universally forbids ACL changes on running executables.

    Potential fixes to investigate:

    • Complete required sandbox/runtime ACL provisioning before launching the runtime.
    • Skip ACL mutations when effective permissions already satisfy sandbox requirements.
    • Use access/share flags compatible with runtime lifetime while preserving sandbox security.
    • Avoid treating a stale setup_error.json as a current failure after successful provisioning, and surface the affected path and OS error rather than only helper_unknown_error.

    Please triage this as a Windows sandbox provisioning/runtime interaction rather than only a computer-use helper startup failure.

  5. damian5505 commented on Oct 9, 2026

    @damian5505

    Additional evidence for the same Windows sandbox/runtime image sharing violation.

    Environment

    • Codex CLI: 0.162.1.
    • Shared app-server: 0.162.1 in a previous snapshot (2026-10-09 21:00 UTC); not freshly revalidated for this comment.
    • Windows 11 Pro: 10.0.26200, build 26200.

    Existing observations

    • Ordinary sandbox exec fails before the shell starts: helper_unknown_error: setup refresh had errors.
    • Primary runtime validation reports open ACL target for root-only update on %LOCALAPPDATA%/OpenAI/Codex/runtimes/cua_node/<runtime>/bin/node_repl.exe with (os error 32). The failure was observed on both an older and a current runtime image.
    • Only three identity-verified REPL workers from an old session were reset. Their parent and other active sessions were preserved. The parent recreated workers and the validation failure recurred. No further processes were stopped.
    • A later independent ordinary-exec check still failed before shell startup.

    Harmless reproduction command to try in the affected session: cmd.exe /d /c echo RUNTIME_REPRO. This is a documented example, not a new test performed for this comment. Expected: the command launches within the configured sandbox boundaries and prints the marker.

    Limited comparison

    A one-shot MXC filesystem probe with managed configuration included passed: writes within the workspace were allowed, writes outside it were denied, and the temporary canaries were removed. Network equivalence remains unknown. No persistent MXC preference was set; security configuration was unchanged.

    Please provide a supported recovery for the runtime image/ACL validation failure that preserves existing sandbox restrictions and active sessions. No raw logs, session transcripts, or full configuration are attached.

  6. onederic commented on Oct 10, 2026

    @onederic

    I can reproduce this issue on Windows 10 Pro with Codex CLI 0.162.0 and the managed app-server daemon 0.162.1.

    Sandbox error

    Failed to create unified exec process:
    helper_unknown_error: setup refresh had errors
    

    Sandbox log (personal paths redacted)

    runtime read/execute validation failed:
    validate runtime read/execute access on
    <LOCAL_APPDATA>\OpenAI\Codex\runtimes\cua_node\<RUNTIME_ID>\bin\node_repl.exe:
    open ACL target for root-only update:
    The process cannot access the file because it is being used by another process. (os error 32)
    

    Reproduction / observations

    1. Start Codex with the normal Windows sandbox. Simple commands such as Get-Location can succeed.
    2. Run git status --short (or some other commands not already approved). Process creation fails with setup refresh had errors. No Git execution result is returned.
    3. The sandbox log shows the exact node_repl.exe sharing violation above at the time of failure.
    4. Two node_repl.exe processes are present under the managed Codex app-server process tree, using the affected runtime binary.
    5. Closing Codex sessions and stopping the remaining managed daemon briefly allows commands to run again, but newly started Codex sessions recreate the Node REPL processes and the failure recurs.
    6. Launching a test session using codex --disable daemon_auto_start did not prevent the failure.
    7. Following sandbox failure, requesting execution outside the sandbox can trigger repeated permission prompts. We did not change ACLs or enable Full Access.

    Expected: permitted read-only commands should start reliably inside the sandbox, including while Codex's Node REPL runtime exists.

    Actual: sandbox setup fails before process creation during runtime read/execute ACL validation.

    Please investigate possible runtime executable sharing/locking vs. sandbox ACL validation. It would be valuable to restore reliability without requiring elevation, ACL changes, or sandbox bypass.

    (Worktree names, absolute account paths, process identifiers, and project details deliberately omitted.)

  7. nofalus-digital commented on Nov 9, 2026

    @nofalus-digital

    Additional Windows recovery observation — locked cua_node runtime

    I encountered a related Codex Windows sandbox failure where even a read-only PowerShell command (Get-Location) could not start:

    helper_unknown_error: setup refresh had errors
    

    Environment and diagnostics

    • Windows, Codex running through the VS Code integration.
    • Windows sandbox mode: elevated.
    • The sandbox log reported runtime read/execute validation failed for an older cua_node/<runtime-id>/bin/node_repl.exe.
    • The reported failure for that executable was Access is denied (os error 5).
    • Separate log entries also mentioned os error 32 during user-profile ACL setup, but those entries said setup was continuing.
    • The affected executable existed, but Windows could not display its security permissions.

    What we observed

    1. Restarting VS Code did not resolve the failure.
    2. Multiple cua_node runtime directories were present, including an older runtime that could not initially be removed.
    3. In Windows Resource Monitor (resmon), under CPU → Associated Handles, searching for node_repl.exe revealed an open handle associated with svchost.exe (InvSvcGroup -p).
    4. After the user independently terminated that service-host process, the handle disappeared and the older runtime directory became removable.
    5. A subsequent Get-Location command completed successfully with exit code 0.

    Important limitations

    This is an observed recovery sequence, not a confirmed root cause or a validated general fix. The relationship between the access-denied error, the sharing violation and the service-host handle has not been established.

    Terminating svchost.exe or Windows services can be disruptive and unsafe. I am not recommending that other users terminate system processes, delete runtime directories, modify ACLs, or weaken sandbox isolation.

    It would be helpful to have an official diagnostic and recovery procedure for stale or locked cua_node runtimes that preserves Windows service stability and the sandbox's security boundaries.

    I hope this additional observation helps narrow down the investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions