openai / openai/codex

Windows: "Couldn't check Windows setup" caused by malformed sandbox setting in config.toml

Open
#44,831 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug config sandbox windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Summary

Codex for Windows was stuck on:

Couldn't check Windows setup
Try again to continue Windows setup

Reinstalling Codex and retrying the Windows setup did not solve the problem.

The issue was resolved by correcting the Windows sandbox setting in:

%USERPROFILE%\.codex\config.toml

Environment
  • Windows 10 Pro
  • Version: 22H2
  • OS Build: 19045.6466
  • Codex app: 26.903.9818.0
Error found in sandbox logs

The sandbox log repeatedly showed:

grant read ACE failed on C:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources for sandbox_group:
SetNamedSecurityInfoW failed: 5

setup error: read ACL run had errors

SetNamedSecurityInfoW failed: 5 indicates an Access Denied error while Codex was trying to configure sandbox permissions.

Important finding

The file:

%USERPROFILE%\.codex\config.toml

contained:

[windows]
sandbox = \"unelevated\"

The escaped quotes were literally present in the TOML file.

Changing it to:

[windows]
sandbox = "unelevated"

and restarting Codex immediately fixed the problem.

No reinstall, Windows update, WSL installation, or modification of C:\Program Files\WindowsApps permissions was required.

Steps that fixed it
  1. Close Codex completely.
  2. Open %USERPROFILE%\.codex\config.toml.
  3. Check the [windows] section.
  4. If it contains sandbox = \"unelevated\", change it to sandbox = "unelevated".
  5. Save the file.
  6. Restart Codex.

Codex then started normally.

Suggestion

It may be useful for Codex to validate config.toml on startup and either:

  • automatically repair this malformed value, or
  • display a clear configuration parsing error instead of repeatedly showing Couldn't check Windows setup.

This could prevent users from repeatedly reinstalling Codex while the actual problem is a malformed local configuration file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Windows setup startup handling for %USERPROFILE%.codex\config.toml and reproduce the literal escaped quotes in the [windows] sandbox setting. Verify that Codex either rejects or repairs the malformed value with a clear configuration error instead of showing only "Couldn't check Windows setup".

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.