Windows elevated sandbox setup fails when `node_repl.exe` is running (OS error 32)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 18/100
Direzione di ricerca
The failure comes from the Windows elevated sandbox setup helper, which logs an ACL validation on the node_repl.exe runtime under cua_node; the issue does not name the source file, so first locate where the helper opens ACL targets for the runtime root-only update. Reproduce by running a sandboxed codex exec while an interactive session holds node_repl.exe open. Done would mean setup succeeds with that executable in use, without weakening the sandbox ACL requirements.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- Windows 11 Home, build 10.0.26300
windows.sandbox = "elevated"- Affected setup helpers:
- npm CLI
0.160.1(@openai/codex-win32-x64,codex-windows-sandbox-setup.exe) - App-server daemon
0.161.0and0.162.0
- npm CLI
- Codex runtime present at
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exe, used by thenode_replMCP server
Observed behavior
Sandboxed Codex commands intermittently fail with:
helper_unknown_error: setup refresh had errors
The sandbox log (~/.codex/.sandbox/sandbox.<date>.log) reports:
runtime read/execute validation failed: validate runtime read/execute access on C:\Users\<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node\<hash>\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)
setup refresh completed with errors: [...]
setup error: setup refresh had errors
setup refresh: exited with status ExitStatus(ExitStatus(1))
The same refresh also reports a non-fatal OS error 32 while attempting to update an ACE on the user-profile directory.
Evidence
- Examined 28 failed sandbox refreshes over approximately 24 hours. All 28 reported the same
node_repl.exefile-sharing error. - The failures began when
node_replwas first used on this machine (~/.codex/node_repl/created at the time of the first failure), although thecua_noderuntime had been installed about two weeks earlier. Approximately 1,060 earlier refreshes in the examined logs had no recorded errors. - Failures also occurred with
codex exec --ignore-user-config, suggesting the behavior is not controlled solely by the user's[mcp_servers.node_repl]configuration. - The executable already had an inherited Modify permission for
CodexSandboxUsers. The helper nevertheless failed while opening the target for its ACL operation. - In observed sessions, sandbox refreshes resumed succeeding after the sessions hosting
node_repl.exeexited and that process terminated.
The relationship between process lifetime and failures is supported by observations and timestamps, but was not captured through simultaneous process and file-handle tracing.
Possible cause (unconfirmed)
The sandbox setup helper may be opening runtime executables with access or sharing flags incompatible with a running executable.
This could cause a Windows sharing violation (ERROR_SHARING_VIOLATION, OS error 32) during ACL validation or modification.
The exact file-opening flags and internal helper behavior have not been verified.
Expected behavior
Codex sandbox initialization should succeed while other Codex sessions are using Codex-provided runtime executables.
Potential fixes to investigate include:
- Opening ACL targets with compatible sharing flags.
- Avoiding unnecessary ACL operations when effective permissions are already sufficient.
- Handling executable-in-use sharing violations without aborting setup, provided sandbox security requirements remain satisfied.
Suggested reproduction (inferred; not deliberately reproduced)
- Install or initialize the Codex runtime containing
cua_node. - Configure Windows elevated sandbox mode.
- Start an interactive Codex session that launches the
node_replMCP server, and confirmnode_repl.exeis running. - In another terminal, execute:
codex exec --ignore-user-config -c windows.sandbox="elevated" --sandbox workspace-write "Run git status."
- Sandbox initialization may fail with
setup refresh had errors. Inspect~/.codex/.sandbox/sandbox.<date>.logfor the sharing violation onnode_repl.exe.
Workaround
Exit interactive Codex sessions hosting node_repl.exe and wait for that process to terminate before dispatching another sandboxed Codex worker.
This has restored successful sandbox initialization in the observed cases.
- Lingua principale
- Rust
- Stelle
- 131k
- Fork
- 20.7k
- Merge medio
- 1m
- PR unite (30g)
- 997
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openai/codex
-
TUI: submitted prompt fallback paints DarkGray without a foreground, making user messages unreadable on light terminalsForse già presa @akhil9tiet l’ha presa oggi. Apertabug CLI TUI
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openai/codex#58711 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug memory windows-os
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Skill Creator quick validator rejects standard compatibility frontmatterForse già presa @akhil9tiet l’ha presa 2 giorni fa. Apertabug skills
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openai/codex#58538 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug CLI connectivity mcp
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openai/codex
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
libnativeapi/nativeapi#21 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
longbridge/nsh#804 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno