Windows sandbox: command-runner crash loop due to C:\Users\Default permission denied (v0.147.0-alpha.6.5)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- operating-systems, security
Research direction
Start by tracing the Windows sandbox “hide users” initialization and command-runner startup from the sandbox runtime, using the reported sandbox.log errors as the reproduction signal. Verify behavior on Windows with C:\Users\Default present; done means protected directories are handled without failing junction setup or restarting the command-runner in a crash loop.
Written by the indexing model from the issue text.
Description
Version
codex-cli 0.147.0-alpha.6.5 on Windows 11 Home China (build 10.0.26200)
Also tested with ChatGPT Windows App v26.803.5235.0
Summary
The Windows sandbox command-runner enters a crash loop because the sandbox setup tries to operate on the system-protected directory C:\Users\Default, causing persistent "Access Denied" errors. This breaks all sandbox-dependent functionality including Computer Use and plugin execution.
Symptoms
- Computer Use plugin fails to initialize —
EPERM: operation not permitted, lstat 'C:\Users\huorenbo\AppData\Local\OpenAI\Codex' - All plugins that require sandbox are unresponsive
- Cannot read desktop window titles from Computer Use
Errors from sandbox log (CODEX_HOME.sandbox\sandbox.log)
Error 1: "hide users" fails on C:\Users\Default (repeats every ~1 second)
hide users: failed to hide current user profile dir (C:\Users\Default):
SetFileAttributesW failed for C:\Users\Default: 5 (拒绝访问。)
Error 2: Junction creation fails on system-protected path
junction: failed to create C:\Users\Default\.codex\.sandbox\cwd: 拒绝访问。 (os error 5)
Error 3: Command-runner pipe closes repeatedly (crash loop)
runner output write failed: 管道正在被关闭。 (os error 232)
runner exit write failed: 管道正在被关闭。 (os error 232)
These three errors cycle continuously, with the command-runner being spawned, failing to hide C:\Users\Default, then crashing (pipe close), then being respawned.
Root Cause Analysis
The sandbox's "hide users" initialization walks user profile directories and tries to SetFileAttributesW on C:\Users\Default. However:
C:\Users\Defaultis a system-protected template directory in Windows- Even with Administrator privileges, modifying this directory requires special permissions
- The failure cascades: hide users fails → junction creation fails → command-runner pipe breaks → respawn → repeat
The sandbox should either skip C:\Users\Default (and similar system directories) or handle the Access Denied gracefully instead of entering a crash loop.
Additional Context
- Dual installation exists: ChatGPT Windows App (26.803.5235.0) + standalone Codex CLI (0.147.0-alpha.6.5), which caused version confusion where sandbox-setup.exe from 26.730.8199.0 was sometimes used alongside command-runner from 26.803.5235.0
- Multiple CUA Node runtimes were installed as duplicates (same version
0.0.6/20260723162306-088049353ddcin two directories) - 10 historical command-runner versions accumulated in
.sandbox-bin\ - After cleanup (removing old versions, deduplicating runtimes), the
C:\Users\Defaultbug still persists as it is a code-level issue
codex doctor output
17 ok · 1 idle · 1 notes · 0 warn · 0 fail
Sandbox: filesystem unrestricted · network enabled
All checks pass at the installation level — the issue is in the sandbox runtime behavior.
Steps to Reproduce
- Install Codex CLI v0.147.0-alpha.6.5 on Windows 11
- Set
sandbox_mode = "danger-full-access"in config.toml - Start the Codex CLI or ChatGPT Windows App
- Enable the Computer Use plugin
- Observe the sandbox log — the "hide users" error on
C:\Users\Defaultwill appear immediately and repeat
Expected Behavior
- Sandbox should skip system-protected directories like
C:\Users\Defaultduring "hide users" - Access Denied on non-essential directory hiding should not cause command-runner crash/restart
- Computer Use should initialize successfully
Workaround
None confirmed. Cleaned up installation (removing old versions, deduplicating runtimes) does not fix the root cause.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·